text: # coding: utf-8
  
  """
      Cisco Intersight OpenAPI specification.
  
      The Cisco Intersight OpenAPI specification.
  
      OpenAPI spec version: 1.0.9-1461
      
      Generated by: https://github.com/swagger-api/swagger-codegen.git
  """
  
  
  from pprint import pformat
  from six import iteritems
  import re
  
  
  class PciLink(object):
      """
      NOTE: This class is auto generated by the swagger code generator program.
      Do not edit the class manually.
      """
  
  
      """
      Attributes:
        swagger_types (dict): The key is attribute name
                              and the value is attribute type.
        attribute_map (dict): The key is attribute name
                              and the value is json key in definition.
      """
      swagger_types = {
          'account_moid': 'str',
          'create_time': 'datetime',
          'domain_group_moid': 'str',
          'mod_time': 'datetime',
          'moid': 'str',
          'object_type': 'str',
          'owners': 'list[str]',
          'shared_scope': 'str',
          'tags': 'list[MoTag]',
          'version_context': 'MoVersionContext',
          'ancestors': 'list[MoBaseMoRef]',
          'parent': 'MoBaseMoRef',
          'permission_resources': 'list[MoBaseMoRef]',
          'device_mo_id': 'str',
          'dn': 'str',
          'rn': 'str',
          'model': 'str',
          'revision': 'str',
          'serial': 'str',
          'vendor': 'str',
          'adapter': 'str',
          'link_speed': 'str',
          'link_status': 'str',
          'link_width': 'str',
          'pci_slot': 'str',
          'slot_status': 'str',
          'pci_switch': 'PciSwitchRef',
          'registered_device': 'AssetDeviceRegistrationRef'
      }
  
      attribute_map = {
          'account_moid': 'AccountMoid',
          'create_time': 'CreateTime',
          'domain_group_moid': 'DomainGroupMoid',
          'mod_time': 'ModTime',
          'moid': 'Moid',
          'object_type': 'ObjectType',
          'owners': 'Owners',
          'shared_scope': 'SharedScope',
          'tags': 'Tags',
          'version_context': 'VersionContext',
          'ancestors': 'Ancestors',
          'parent': 'Parent',
          'permission_resources': 'PermissionResources',
          'device_mo_id': 'DeviceMoId',
          'dn': 'Dn',
          'rn': 'Rn',
          'model': 'Model',
          'revision': 'Revision',
          'serial': 'Serial',
          'vendor': 'Vendor',
          'adapter': 'Adapter',
          'link_speed': 'LinkSpeed',
          'link_status': 'LinkStatus',
          'link_width': 'LinkWidth',
          'pci_slot': 'PciSlot',
          'slot_status': 'SlotStatus',
          'pci_switch': 'PciSwitch',
          'registered_device': 'RegisteredDevice'
      }
  
      def __init__(self, account_moid=None, create_time=None, domain_group_moid=None, mod_time=None, moid=None, object_type=None, owners=None, shared_scope=None, tags=None, version_context=None, ancestors=None, parent=None, permission_resources=None, device_mo_id=None, dn=None, rn=None, model=None, revision=None, serial=None, vendor=None, adapter=None, link_speed=None, link_status=None, link_width=None, pci_slot=None, slot_status=None, pci_switch=None, registered_device=None):
          """
          PciLink - a model defined in Swagger
          """
  
          self._account_moid = None
          self._create_time = None
          self._domain_group_moid = None
          self._mod_time = None
          self._moid = None
          self._object_type = None
          self._owners = None
          self._shared_scope = None
          self._tags = None
          self._version_context = None
          self._ancestors = None
          self._parent = None
          self._permission_resources = None
          self._device_mo_id = None
          self._dn = None
          self._rn = None
          self._model = None
          self._revision = None
          self._serial = None
          self._vendor = None
          self._adapter = None
          self._link_speed = None
          self._link_status = None
          self._link_width = None
          self._pci_slot = None
          self._slot_status = None
          self._pci_switch = None
          self._registered_device = None
  
          if account_moid is not None:
            self.account_moid = account_moid
          if create_time is not None:
            self.create_time = create_time
          if domain_group_moid is not None:
            self.domain_group_moid = domain_group_moid
          if mod_time is not None:
            self.mod_time = mod_time
          if moid is not None:
            self.moid = moid
          if object_type is not None:
            self.object_type = object_type
          if owners is not None:
            self.owners = owners
          if shared_scope is not None:
            self.shared_scope = shared_scope
          if tags is not None:
            self.tags = tags
          if version_context is not None:
            self.version_context = version_context
          if ancestors is not None:
            self.ancestors = ancestors
          if parent is not None:
            self.parent = parent
          if permission_resources is not None:
            self.permission_resources = permission_resources
          if device_mo_id is not None:
            self.device_mo_id = device_mo_id
          if dn is not None:
            self.dn = dn
          if rn is not None:
            self.rn = rn
          if model is not None:
            self.model = model
          if revision is not None:
            self.revision = revision
          if serial is not None:
            self.serial = serial
          if vendor is not None:
            self.vendor = vendor
          if adapter is not None:
            self.adapter = adapter
          if link_speed is not None:
            self.link_speed = link_speed
          if link_status is not None:
            self.link_status = link_status
          if link_width is not None:
            self.link_width = link_width
          if pci_slot is not None:
            self.pci_slot = pci_slot
          if slot_status is not None:
            self.slot_status = slot_status
          if pci_switch is not None:
            self.pci_switch = pci_switch
          if registered_device is not None:
            self.registered_device = registered_device
  
      @property
      def account_moid(self):
          """
          Gets the account_moid of this PciLink.
          The Account ID for this managed object.
  
          :return: The account_moid of this PciLink.
          :rtype: str
          """
          return self._account_moid
  
      @account_moid.setter
      def account_moid(self, account_moid):
          """
          Sets the account_moid of this PciLink.
          The Account ID for this managed object.
  
          :param account_moid: The account_moid of this PciLink.
          :type: str
          """
  
          self._account_moid = account_moid
  
      @property
      def create_time(self):
          """
          Gets the create_time of this PciLink.
          The time when this managed object was created.
  
          :return: The create_time of this PciLink.
          :rtype: datetime
          """
          return self._create_time
  
      @create_time.setter
      def create_time(self, create_time):
          """
          Sets the create_time of this PciLink.
          The time when this managed object was created.
  
          :param create_time: The create_time of this PciLink.
          :type: datetime
          """
  
          self._create_time = create_time
  
      @property
      def domain_group_moid(self):
          """
          Gets the domain_group_moid of this PciLink.
          The DomainGroup ID for this managed object.
  
          :return: The domain_group_moid of this PciLink.
          :rtype: str
          """
          return self._domain_group_moid
  
      @domain_group_moid.setter
      def domain_group_moid(self, domain_group_moid):
          """
          Sets the domain_group_moid of this PciLink.
          The DomainGroup ID for this managed object.
  
          :param domain_group_moid: The domain_group_moid of this PciLink.
          :type: str
          """
  
          self._domain_group_moid = domain_group_moid
  
      @property
      def mod_time(self):
          """
          Gets the mod_time of this PciLink.
          The time when this managed object was last modified.
  
          :return: The mod_time of this PciLink.
          :rtype: datetime
          """
          return self._mod_time
  
      @mod_time.setter
      def mod_time(self, mod_time):
          """
          Sets the mod_time of this PciLink.
          The time when this managed object was last modified.
  
          :param mod_time: The mod_time of this PciLink.
          :type: datetime
          """
  
          self._mod_time = mod_time
  
      @property
      def moid(self):
          """
          Gets the moid of this PciLink.
          The unique identifier of this Managed Object instance.
  
          :return: The moid of this PciLink.
          :rtype: str
          """
          return self._moid
  
      @moid.setter
      def moid(self, moid):
          """
          Sets the moid of this PciLink.
          The unique identifier of this Managed Object instance.
  
          :param moid: The moid of this PciLink.
          :type: str
          """
  
          self._moid = moid
  
      @property
      def object_type(self):
          """
          Gets the object_type of this PciLink.
          The fully-qualified type of this managed object, i.e. the class name. This property is optional. The ObjectType is implied from the URL path. If specified, the value of objectType must match the class name specified in the URL path.
  
          :return: The object_type of this PciLink.
          :rtype: str
          """
          return self._object_type
  
      @object_type.setter
      def object_type(self, object_type):
          """
          Sets the object_type of this PciLink.
          The fully-qualified type of this managed object, i.e. the class name. This property is optional. The ObjectType is implied from the URL path. If specified, the value of objectType must match the class name specified in the URL path.
  
          :param object_type: The object_type of this PciLink.
          :type: str
          """
  
          self._object_type = object_type
  
      @property
      def owners(self):
          """
          Gets the owners of this PciLink.
          The array of owners which represent effective ownership of this object.
  
          :return: The owners of this PciLink.
          :rtype: list[str]
          """
          return self._owners
  
      @owners.setter
      def owners(self, owners):
          """
          Sets the owners of this PciLink.
          The array of owners which represent effective ownership of this object.
  
          :param owners: The owners of this PciLink.
          :type: list[str]
          """
  
          self._owners = owners
  
      @property
      def shared_scope(self):
          """
          Gets the shared_scope of this PciLink.
          Intersight provides pre-built workflows, tasks and policies to end users through global catalogs. Objects that are made available through global catalogs are said to have a 'shared' ownership. Shared objects are either made globally available to all end users or restricted to end users based on their license entitlement. Users can use this property to differentiate the scope (global or a specific license tier) to which a shared MO belongs.
  
          :return: The shared_scope of this PciLink.
          :rtype: str
          """
          return self._shared_scope
  
      @shared_scope.setter
      def shared_scope(self, shared_scope):
          """
          Sets the shared_scope of this PciLink.
          Intersight provides pre-built workflows, tasks and policies to end users through global catalogs. Objects that are made available through global catalogs are said to have a 'shared' ownership. Shared objects are either made globally available to all end users or restricted to end users based on their license entitlement. Users can use this property to differentiate the scope (global or a specific license tier) to which a shared MO belongs.
  
          :param shared_scope: The shared_scope of this PciLink.
          :type: str
          """
  
          self._shared_scope = shared_scope
  
      @property
      def tags(self):
          """
          Gets the tags of this PciLink.
          The array of tags, which allow to add key, value meta-data to managed objects.
  
          :return: The tags of this PciLink.
          :rtype: list[MoTag]
          """
          return self._tags
  
      @tags.setter
      def tags(self, tags):
          """
          Sets the tags of this PciLink.
          The array of tags, which allow to add key, value meta-data to managed objects.
  
          :param tags: The tags of this PciLink.
          :type: list[MoTag]
          """
  
          self._tags = tags
  
      @property
      def version_context(self):
          """
          Gets the version_context of this PciLink.
          The versioning info for this managed object.
  
          :return: The version_context of this PciLink.
          :rtype: MoVersionContext
          """
          return self._version_context
  
      @version_context.setter
      def version_context(self, version_context):
          """
          Sets the version_context of this PciLink.
          The versioning info for this managed object.
  
          :param version_context: The version_context of this PciLink.
          :type: MoVersionContext
          """
  
          self._version_context = version_context
  
      @property
      def ancestors(self):
          """
          Gets the ancestors of this PciLink.
          The array containing the MO references of the ancestors in the object containment hierarchy.
  
          :return: The ancestors of this PciLink.
          :rtype: list[MoBaseMoRef]
          """
          return self._ancestors
  
      @ancestors.setter
      def ancestors(self, ancestors):
          """
          Sets the ancestors of this PciLink.
          The array containing the MO references of the ancestors in the object containment hierarchy.
  
          :param ancestors: The ancestors of this PciLink.
          :type: list[MoBaseMoRef]
          """
  
          self._ancestors = ancestors
  
      @property
      def parent(self):
          """
          Gets the parent of this PciLink.
          The direct ancestor of this managed object in the containment hierarchy.
  
          :return: The parent of this PciLink.
          :rtype: MoBaseMoRef
          """
          return self._parent
  
      @parent.setter
      def parent(self, parent):
          """
          Sets the parent of this PciLink.
          The direct ancestor of this managed object in the containment hierarchy.
  
          :param parent: The parent of this PciLink.
          :type: MoBaseMoRef
          """
  
          self._parent = parent
  
      @property
      def permission_resources(self):
          """
          Gets the permission_resources of this PciLink.
          A slice of all permission resources (organizations) associated with this object. Permission ties resources and its associated roles/privileges. These resources which can be specified in a permission is PermissionResource. Currently only organizations can be specified in permission. All logical and physical resources part of an organization will have organization in PermissionResources field. If DeviceRegistration contains another DeviceRegistration and if parent is in org1 and child is part of org2, then child objects will have PermissionResources as org1 and org2. Parent Objects will have PermissionResources as org1. All profiles/policies created with in an organization will have the organization as PermissionResources.
  
          :return: The permission_resources of this PciLink.
          :rtype: list[MoBaseMoRef]
          """
          return self._permission_resources
  
      @permission_resources.setter
      def permission_resources(self, permission_resources):
          """
          Sets the permission_resources of this PciLink.
          A slice of all permission resources (organizations) associated with this object. Permission ties resources and its associated roles/privileges. These resources which can be specified in a permission is PermissionResource. Currently only organizations can be specified in permission. All logical and physical resources part of an organization will have organization in PermissionResources field. If DeviceRegistration contains another DeviceRegistration and if parent is in org1 and child is part of org2, then child objects will have PermissionResources as org1 and org2. Parent Objects will have PermissionResources as org1. All profiles/policies created with in an organization will have the organization as PermissionResources.
  
          :param permission_resources: The permission_resources of this PciLink.
          :type: list[MoBaseMoRef]
          """
  
          self._permission_resources = permission_resources
  
      @property
      def device_mo_id(self):
          """
          Gets the device_mo_id of this PciLink.
  
          :return: The device_mo_id of this PciLink.
          :rtype: str
          """
          return self._device_mo_id
  
      @device_mo_id.setter
      def device_mo_id(self, device_mo_id):
          """
          Sets the device_mo_id of this PciLink.
  
          :param device_mo_id: The device_mo_id of this PciLink.
          :type: str
          """
  
          self._device_mo_id = device_mo_id
  
      @property
      def dn(self):
          """
          Gets the dn of this PciLink.
          The Distinguished Name unambiguously identifies an object in the system.
  
          :return: The dn of this PciLink.
          :rtype: str
          """
          return self._dn
  
      @dn.setter
      def dn(self, dn):
          """
          Sets the dn of this PciLink.
          The Distinguished Name unambiguously identifies an object in the system.
  
          :param dn: The dn of this PciLink.
          :type: str
          """
  
          self._dn = dn
  
      @property
      def rn(self):
          """
          Gets the rn of this PciLink.
          The Relative Name uniquely identifies an object within a given context.
  
          :return: The rn of this PciLink.
          :rtype: str
          """
          return self._rn
  
      @rn.setter
      def rn(self, rn):
          """
          Sets the rn of this PciLink.
          The Relative Name uniquely identifies an object within a given context.
  
          :param rn: The rn of this PciLink.
          :type: str
          """
  
          self._rn = rn
  
      @property
      def model(self):
          """
          Gets the model of this PciLink.
          This field identifies the model of the given component.
  
          :return: The model of this PciLink.
          :rtype: str
          """
          return self._model
  
      @model.setter
      def model(self, model):
          """
          Sets the model of this PciLink.
          This field identifies the model of the given component.
  
          :param model: The model of this PciLink.
          :type: str
          """
  
          self._model = model
  
      @property
      def revision(self):
          """
          Gets the revision of this PciLink.
  
          :return: The revision of this PciLink.
          :rtype: str
          """
          return self._revision
  
      @revision.setter
      def revision(self, revision):
          """
          Sets the revision of this PciLink.
  
          :param revision: The revision of this PciLink.
          :type: str
          """
  
          self._revision = revision
  
      @property
      def serial(self):
          """
          Gets the serial of this PciLink.
          This field identifies the serial of the given component.
  
          :return: The serial of this PciLink.
          :rtype: str
          """
          return self._serial
  
      @serial.setter
      def serial(self, serial):
          """
          Sets the serial of this PciLink.
          This field identifies the serial of the given component.
  
          :param serial: The serial of this PciLink.
          :type: str
          """
  
          self._serial = serial
  
      @property
      def vendor(self):
          """
          Gets the vendor of this PciLink.
          This field identifies the vendor of the given component.
  
          :return: The vendor of this PciLink.
          :rtype: str
          """
          return self._vendor
  
      @vendor.setter
      def vendor(self, vendor):
          """
          Sets the vendor of this PciLink.
          This field identifies the vendor of the given component.
  
          :param vendor: The vendor of this PciLink.
          :type: str
          """
  
          self._vendor = vendor
  
      @property
      def adapter(self):
          """
          Gets the adapter of this PciLink.
          It shows the name of the pci device.
  
          :return: The adapter of this PciLink.
          :rtype: str
          """
          return self._adapter
  
      @adapter.setter
      def adapter(self, adapter):
          """
          Sets the adapter of this PciLink.
          It shows the name of the pci device.
  
          :param adapter: The adapter of this PciLink.
          :type: str
          """
  
          self._adapter = adapter
  
      @property
      def link_speed(self):
          """
          Gets the link_speed of this PciLink.
          It shows the upstream link speed for device.
  
          :return: The link_speed of this PciLink.
          :rtype: str
          """
          return self._link_speed
  
      @link_speed.setter
      def link_speed(self, link_speed):
          """
          Sets the link_speed of this PciLink.
          It shows the upstream link speed for device.
  
          :param link_speed: The link_speed of this PciLink.
          :type: str
          """
  
          self._link_speed = link_speed
  
      @property
      def link_status(self):
          """
          Gets the link_status of this PciLink.
          It shows the upstream link status for device.
  
          :return: The link_status of this PciLink.
          :rtype: str
          """
          return self._link_status
  
      @link_status.setter
      def link_status(self, link_status):
          """
          Sets the link_status of this PciLink.
          It shows the upstream link status for device.
  
          :param link_status: The link_status of this PciLink.
          :type: str
          """
  
          self._link_status = link_status
  
      @property
      def link_width(self):
          """
          Gets the link_width of this PciLink.
          It shows the upstream link width for device.
  
          :return: The link_width of this PciLink.
          :rtype: str
          """
          return self._link_width
  
      @link_width.setter
      def link_width(self, link_width):
          """
          Sets the link_width of this PciLink.
          It shows the upstream link width for device.
  
          :param link_width: The link_width of this PciLink.
          :type: str
          """
  
          self._link_width = link_width
  
      @property
      def pci_slot(self):
          """
          Gets the pci_slot of this PciLink.
          It shows pci slot name for the pci device.
  
          :return: The pci_slot of this PciLink.
          :rtype: str
          """
          return self._pci_slot
  
      @pci_slot.setter
      def pci_slot(self, pci_slot):
          """
          Sets the pci_slot of this PciLink.
          It shows pci slot name for the pci device.
  
          :param pci_slot: The pci_slot of this PciLink.
          :type: str
          """
  
          self._pci_slot = pci_slot
  
      @property
      def slot_status(self):
          """
          Gets the slot_status of this PciLink.
          It shows the health information for pci device.
  
          :return: The slot_status of this PciLink.
          :rtype: str
          """
          return self._slot_status
  
      @slot_status.setter
      def slot_status(self, slot_status):
          """
          Sets the slot_status of this PciLink.
          It shows the health information for pci device.
  
          :param slot_status: The slot_status of this PciLink.
          :type: str
          """
  
          self._slot_status = slot_status
  
      @property
      def pci_switch(self):
          """
          Gets the pci_switch of this PciLink.
          A collection of references to the [pci.Switch](mo://pci.Switch) Managed Object. When this managed object is deleted, the referenced [pci.Switch](mo://pci.Switch) MO unsets its reference to this deleted MO.
  
          :return: The pci_switch of this PciLink.
          :rtype: PciSwitchRef
          """
          return self._pci_switch
  
      @pci_switch.setter
      def pci_switch(self, pci_switch):
          """
          Sets the pci_switch of this PciLink.
          A collection of references to the [pci.Switch](mo://pci.Switch) Managed Object. When this managed object is deleted, the referenced [pci.Switch](mo://pci.Switch) MO unsets its reference to this deleted MO.
  
          :param pci_switch: The pci_switch of this PciLink.
          :type: PciSwitchRef
          """
  
          self._pci_switch = pci_switch
  
      @property
      def registered_device(self):
          """
          Gets the registered_device of this PciLink.
          The Device to which this Managed Object is associated.
  
          :return: The registered_device of this PciLink.
          :rtype: AssetDeviceRegistrationRef
          """
          return self._registered_device
  
      @registered_device.setter
      def registered_device(self, registered_device):
          """
          Sets the registered_device of this PciLink.
          The Device to which this Managed Object is associated.
  
          :param registered_device: The registered_device of this PciLink.
          :type: AssetDeviceRegistrationRef
          """
  
          self._registered_device = registered_device
  
      def to_dict(self):
          """
          Returns the model properties as a dict
          """
          result = {}
  
          for attr, _ in iteritems(self.swagger_types):
              value = getattr(self, attr)
              if isinstance(value, list):
                  result[attr] = list(map(
                      lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                      value
                  ))
              elif hasattr(value, "to_dict"):
                  result[attr] = value.to_dict()
              elif isinstance(value, dict):
                  result[attr] = dict(map(
                      lambda item: (item[0], item[1].to_dict())
                      if hasattr(item[1], "to_dict") else item,
                      value.items()
                  ))
              else:
                  result[attr] = value
  
          return result
  
      def to_str(self):
          """
          Returns the string representation of the model
          """
          return pformat(self.to_dict())
  
      def __repr__(self):
          """
          For `print` and `pprint`
          """
          return self.to_str()
  
      def __eq__(self, other):
          """
          Returns true if both objects are equal
          """
          if not isinstance(other, PciLink):
              return False
  
          return self.__dict__ == other.__dict__
  
      def __ne__(self, other):
          """
          Returns true if both objects are not equal
          """
          return not self == other
  