/* SPDX-License-Identifier: Apache-2.0 */
// This is a generated file - do not edit - changes should be made to the templates amd/or generator to generate this file with changes.

package org.odpi.openmetadata.accessservices.subjectarea.generated.relationships.<$$uname$$>;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.*;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.*;

//omrs
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*;
//omrs beans
import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.line.Line;
import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.line.LineType;

/**
 * <$$uname$$> is a relationship between an entity of type <$$entityProxy1Type$$> and an entity of type <$$entityProxy2Type$$>.
 * The ends of the relationship are stored as entity proxies, where there is a 'proxy' name by which the entity type is known.
 * The first entity proxy has <$$entityProxy1Name$$> as the proxy name for entity type <$$entityProxy1Type$$>.
 * The second entity proxy has <$$entityProxy2Name$$> as the proxy name for entity type <$$entityProxy2Type$$>.
 *
 * Each entity proxy also stores the entities guid.

 <$$description$$>
 */
public class <$$uname$$> extends Line {
    private static final Logger log = LoggerFactory.getLogger(<$$uname$$>.class);
    private static final String className = <$$uname$$>.class.getName();

   //public java.util.Set<String> propertyNames = new HashSet<>();
      public static final String[] PROPERTY_NAMES_SET_VALUES = new String[] {
      <$$$
          "<$$PropertyName$$>",
      $$$>

      // Terminate the list
          null
      };
      public static final String[] ATTRIBUTE_NAMES_SET_VALUES = new String[] {
       <$Attr$$
          "<$$AttrName$$>",
       $Attr$$>

       // Terminate the list
          null
      };
      public static final String[] ENUM_NAMES_SET_VALUES = new String[] {
       <$Enum$$
           "<$$EnumName$$>",
       $Enum$$>

           // Terminate the list
            null
      };
      public static final String[] MAP_NAMES_SET_VALUES = new String[] {
       <$Map$$
           "<$$MapName$$>",
       $Map$$>

           // Terminate the list
           null
      };
      public static final java.util.Set<String> PROPERTY_NAMES_SET = new HashSet(new HashSet<>(Arrays.asList(PROPERTY_NAMES_SET_VALUES)));
      public static final java.util.Set<String> ATTRIBUTE_NAMES_SET = new HashSet(new HashSet<>(Arrays.asList(ATTRIBUTE_NAMES_SET_VALUES)));
      public static final java.util.Set<String> ENUM_NAMES_SET = new HashSet(new HashSet<>(Arrays.asList(ENUM_NAMES_SET_VALUES)));
      public static final java.util.Set<String> MAP_NAMES_SET = new HashSet(new HashSet<>(Arrays.asList(MAP_NAMES_SET_VALUES)));


    
    public <$$uname$$>() {
       name = "<$$uname$$>";
       // set the LineType if this is a LineType enum value.
       try {
           lineType = LineType.valueOf(name);
        }
        catch (IllegalArgumentException e) {
           lineType = LineType.Other;
        }
        entity1Name = "<$$entityProxy1Name$$>";
        entity1Type = "<$$entityProxy1Type$$>";
        entity2Name = "<$$entityProxy2Name$$>";
        entity2Type = "<$$entityProxy2Type$$>";
        typeDefGuid = "<$$typeDefGuid$$>";
    }

    public <$$uname$$>(Relationship omrsRelationship) {
        super(omrsRelationship);
        name = "<$$uname$$>";
       // set the LineType if this is a LineType enum value.
       try {
           lineType = LineType.valueOf(name);
        }
        catch (IllegalArgumentException e) {
           lineType = LineType.Other;
        }
    }

    InstanceProperties obtainInstanceProperties() {
          final String methodName = "obtainInstanceProperties";
          if (log.isDebugEnabled()) {
                 log.debug("==> Method: " + methodName);
          }
          InstanceProperties instanceProperties = new InstanceProperties();
          EnumPropertyValue enumPropertyValue=null;
          <$Enum$$
          enumPropertyValue = new EnumPropertyValue();
          // <$$description$$>
          enumPropertyValue.setOrdinal(<$$EnumName$$>.ordinal());
          enumPropertyValue.setSymbolicName(<$$EnumName$$>.name());
          instanceProperties.setProperty("<$$EnumName$$>",enumPropertyValue);
          $Enum$$>
          MapPropertyValue mapPropertyValue=null;
          <$Map$$
          // <$$description$$>
          mapPropertyValue = new MapPropertyValue();
          $Map$$>
          PrimitivePropertyValue primitivePropertyValue=null;
           <$$$
          primitivePropertyValue = new PrimitivePropertyValue();
          // TODO  description + change null to value
          primitivePropertyValue.setPrimitiveValue(null);
          instanceProperties.setProperty("<$$PropertyName$$>",primitivePropertyValue);
           $$$>
          if (log.isDebugEnabled()) {
                 log.debug("<== Method: " + methodName);
          }
          return instanceProperties;
    }

     <$$$
         private <$$PropertyType$$> <$$PropertyName$$>;
        /**
            * {@literal <$$AttrDescription$$> }
            * @return {@code <$$PropertyTypeJavadoc$$> }
            */
         public <$$PropertyType$$> get<$$uPropertyName$$>() {
             return this.<$$PropertyName$$>;
         }
         public void set<$$uPropertyName$$>(<$$PropertyType$$> <$$PropertyName$$>)  {
            this.<$$PropertyName$$> = <$$PropertyName$$>;
        }
     $$$>
}
