def __init__(
        self,
        _client=None,
        created_at=None,
        datafile_size=None,
        datafile_url=None,
        description=None,
        device_class=None,
        id=None,
        key_table_url=None,
        name=None,
        timestamp=None,
        updated_at=None,
    ):
        """Creates a local `FirmwareManifest` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param created_at: The time the object was created
        :type created_at: datetime
        :param datafile_size: The size of the datafile in bytes
        :type datafile_size: int
        :param datafile_url: The URL of the firmware manifest binary
        :type datafile_url: str
        :param description: The description of the firmware manifest
        :type description: str
        :param device_class: The class of the device
        :type device_class: str
        :param id: (Required) The firmware manifest ID
        :type id: str
        :param key_table_url: The key table of pre-shared keys for devices
        :type key_table_url: str
        :param name: The name of the object
        :type name: str
        :param timestamp: The firmware manifest version as a timestamp
        :type timestamp: datetime
        :param updated_at: The time the object was updated
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._created_at = fields.DateTimeField(value=created_at)
        self._datafile_size = fields.IntegerField(value=datafile_size)
        self._datafile_url = fields.StringField(value=datafile_url)
        self._description = fields.StringField(value=description)
        self._device_class = fields.StringField(value=device_class)
        self._id = fields.StringField(value=id)
        self._key_table_url = fields.StringField(value=key_table_url)
        self._name = fields.StringField(value=name)
        self._timestamp = fields.DateTimeField(value=timestamp)
        self._updated_at = fields.DateTimeField(value=updated_at)
예제 #2
0
    def __init__(
        self,
        _client=None,
        certificate_name=None,
        created_at=None,
        device_id=None,
        enroll_result=None,
        enroll_result_detail=None,
        enroll_status=None,
        id=None,
        updated_at=None,
    ):
        """Creates a local `CertificateEnrollment` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param certificate_name: The certificate name.
        :type certificate_name: str
        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param device_id: The device ID.
        :type device_id: str
        :param enroll_result: The result of certificate enrollment request.
        :type enroll_result: str
        :param enroll_result_detail: Additional information in case of failure.
        :type enroll_result_detail: str
        :param enroll_status: The status of certificate enrollment request.
        :type enroll_status: str
        :param id: (Required) The certificate enrollment ID.
        :type id: str
        :param updated_at: Update UTC time RFC3339.
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._certificate_name = fields.StringField(value=certificate_name)
        self._created_at = fields.DateTimeField(value=created_at)
        self._device_id = fields.StringField(value=device_id)
        self._enroll_result = fields.StringField(
            value=enroll_result,
            enum=enums.CertificateEnrollmentEnrollResultEnum)
        self._enroll_result_detail = fields.StringField(
            value=enroll_result_detail)
        self._enroll_status = fields.StringField(
            value=enroll_status,
            enum=enums.CertificateEnrollmentEnrollStatusEnum)
        self._id = fields.StringField(value=id)
        self._updated_at = fields.DateTimeField(value=updated_at)
예제 #3
0
    def __init__(
        self,
        _client=None,
        account_id=None,
        created_at=None,
        email=None,
        expiration=None,
        id=None,
        login_profiles=None,
        updated_at=None,
        user_id=None,
    ):
        """Creates a local `SubtenantUserInvitation` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: (Required) The ID of the account the user is invited to.
        :type account_id: str
        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param email: (Required) Email address of the invited user.
        :type email: str
        :param expiration: Invitation expiration as UTC time RFC3339.
        :type expiration: datetime
        :param id: (Required) The ID of the invitation.
        :type id: str
        :param login_profiles: A list of login profiles for the user. Specified as the identity
            providers the user is associated with.
        :type login_profiles: list
        :param updated_at: Last update UTC time RFC3339.
        :type updated_at: datetime
        :param user_id: The ID of the invited user.
        :type user_id: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        from mbed_cloud.foundation.entities.accounts.login_profile import LoginProfile

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._created_at = fields.DateTimeField(value=created_at)
        self._email = fields.StringField(value=email)
        self._expiration = fields.DateTimeField(value=expiration)
        self._id = fields.StringField(value=id)
        self._login_profiles = fields.ListField(value=login_profiles,
                                                entity=LoginProfile)
        self._updated_at = fields.DateTimeField(value=updated_at)
        self._user_id = fields.StringField(value=user_id)
    def __init__(
        self,
        _client=None,
        created_at=None,
        datafile_checksum=None,
        datafile_size=None,
        datafile_url=None,
        description=None,
        id=None,
        name=None,
        updated_at=None,
    ):
        """Creates a local `FirmwareImage` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param created_at: The time the object was created
        :type created_at: datetime
        :param datafile_checksum: The checksum (sha256) generated for the datafile
        :type datafile_checksum: str
        :param datafile_size: The size of the datafile in bytes
        :type datafile_size: int
        :param datafile_url: The firmware image file URL
        :type datafile_url: str
        :param description: The description of the object
        :type description: str
        :param id: (Required) The firmware image ID
        :type id: str
        :param name: The firmware image name
        :type name: str
        :param updated_at: The time the object was updated
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._created_at = fields.DateTimeField(value=created_at)
        self._datafile_checksum = fields.StringField(value=datafile_checksum)
        self._datafile_size = fields.IntegerField(value=datafile_size)
        self._datafile_url = fields.StringField(value=datafile_url)
        self._description = fields.StringField(value=description)
        self._id = fields.StringField(value=id)
        self._name = fields.StringField(value=name)
        self._updated_at = fields.DateTimeField(value=updated_at)
    def __init__(
        self,
        _client=None,
        account_id=None,
        claimed_at=None,
        created_at=None,
        enrolled_device_id=None,
        enrollment_identity=None,
        expires_at=None,
        id=None,
    ):
        """Creates a local `DeviceEnrollment` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: ID
        :type account_id: str
        :param claimed_at: The time the device was claimed.
        :type claimed_at: datetime
        :param created_at: The time of the enrollment identity creation.
        :type created_at: datetime
        :param enrolled_device_id: The ID of the device in the Device Directory once it is
            registered.
        :type enrolled_device_id: str
        :param enrollment_identity: (Required) Enrollment identity.
        :type enrollment_identity: str
        :param expires_at: The enrollment claim expiration time. If the device does not
            connect to Device Management before expiration, the claim is
            removed without separate notice.
        :type expires_at: datetime
        :param id: (Required) Enrollment identity.
        :type id: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._claimed_at = fields.DateTimeField(value=claimed_at)
        self._created_at = fields.DateTimeField(value=created_at)
        self._enrolled_device_id = fields.StringField(value=enrolled_device_id)
        self._enrollment_identity = fields.StringField(value=enrollment_identity)
        self._expires_at = fields.DateTimeField(value=expires_at)
        self._id = fields.StringField(value=id)
    def __init__(
        self,
        _client=None,
        created_at=None,
        custom_attributes=None,
        description=None,
        devices_count=None,
        id=None,
        name=None,
        updated_at=None,
    ):
        """Creates a local `DeviceGroup` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param created_at: The time the campaign was created.
        :type created_at: datetime
        :param custom_attributes: Up to ten custom key-value attributes. Note that keys cannot begin
            with a number. Both keys and values are limited to 128 characters.
            Updating this field replaces existing contents.
        :type custom_attributes: dict
        :param description: The description of the group.
        :type description: str
        :param devices_count: The number of devices in this group.
        :type devices_count: int
        :param id: (Required) The group ID.
        :type id: str
        :param name: Name of the group.
        :type name: str
        :param updated_at: The time the object was updated.
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._created_at = fields.DateTimeField(value=created_at)
        self._custom_attributes = fields.DictField(value=custom_attributes)
        self._description = fields.StringField(value=description)
        self._devices_count = fields.IntegerField(value=devices_count)
        self._id = fields.StringField(value=id)
        self._name = fields.StringField(value=name)
        self._updated_at = fields.DateTimeField(value=updated_at)
예제 #7
0
    def __init__(self, _client=None, created_at=None, id=None, server_certificate=None, server_uri=None):
        """Creates a local `ServerCredentials` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param id: Unique entity ID.
        :type id: str
        :param server_certificate: PEM-format X.509 server certificate used to validate the server
            certificate received during the TLS/DTLS handshake.
        :type server_certificate: str
        :param server_uri: Server URI that the client connects to.
        :type server_uri: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._created_at = fields.DateTimeField(value=created_at)
        self._id = fields.StringField(value=id)
        self._server_certificate = fields.StringField(value=server_certificate)
        self._server_uri = fields.StringField(value=server_uri)
    def __init__(self, _client=None, date=None, ip_address=None, success=None, user_agent=None):
        """Creates a local `LoginHistory` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param date: UTC time RFC3339 for this login attempt.
        :type date: datetime
        :param ip_address: IP address of the client.
        :type ip_address: str
        :param success: Flag indicating whether login attempt was successful or not.
        :type success: bool
        :param user_agent: User Agent header from the login request.
        :type user_agent: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._date = fields.DateTimeField(value=date)
        self._ip_address = fields.StringField(value=ip_address)
        self._success = fields.BooleanField(value=success)
        self._user_agent = fields.StringField(value=user_agent)
    def __init__(self,
                 _client=None,
                 color=None,
                 reference=None,
                 updated_at=None):
        """Creates a local `SubtenantDarkThemeColor` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param color: The color given as name (purple) or as a hex code.
        :type color: str
        :param reference: Color name.
        :type reference: str
        :param updated_at: Last update time in UTC.
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._color = fields.StringField(value=color)
        self._reference = fields.StringField(
            value=reference, enum=enums.SubtenantDarkThemeColorReferenceEnum)
        self._updated_at = fields.DateTimeField(value=updated_at)
    def __init__(self,
                 _client=None,
                 reference=None,
                 static_uri=None,
                 updated_at=None):
        """Creates a local `DarkThemeImage` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param reference: Name of the image.
        :type reference: str
        :param static_uri: The static link to the image.
        :type static_uri: str
        :param updated_at: Last update time in UTC.
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._reference = fields.StringField(
            value=reference, enum=enums.DarkThemeImageReferenceEnum)
        self._static_uri = fields.StringField(value=static_uri)
        self._updated_at = fields.DateTimeField(value=updated_at)
예제 #11
0
    def __init__(self,
                 _client=None,
                 created_at=None,
                 endpoint_name=None,
                 id=None):
        """Creates a local `PreSharedKey` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param created_at: The date-time (RFC3339) when this PSK was uploaded to Device
            Management.
        :type created_at: datetime
        :param endpoint_name: The unique endpoint identifier that this PSK applies to. 16-64 [pr
            intable](https://en.wikipedia.org/wiki/ASCII#Printable_characters)
            (non-control) ASCII characters.
        :type endpoint_name: str
        :param id: The Id of the pre_shared_key, shadows the endpoint_name
        :type id: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._created_at = fields.DateTimeField(value=created_at)
        self._endpoint_name = fields.StringField(value=endpoint_name)
        self._id = fields.StringField(value=id)
예제 #12
0
    def __init__(
        self,
        _client=None,
        created_at=None,
        description=None,
        id=None,
        issuer_attributes=None,
        issuer_type=None,
        name=None,
    ):
        """Creates a local `CertificateIssuer` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param description: General description for the certificate issuer.
        :type description: str
        :param id: (Required) The ID of the certificate issuer.
        :type id: str
        :param issuer_attributes: General attributes for connecting the certificate issuer.
            When the
            issuer_type is GLOBAL_SIGN, the value shall be empty.
            When the
            issuer_type is CFSSL_AUTH, see definition of CfsslAttributes.
        :type issuer_attributes: dict
        :param issuer_type: (Required) The type of the certificate issuer.
            - GLOBAL_SIGN:
              Certificates
            are issued by GlobalSign service. The users must provide their own
            GlobalSign account credentials.
            - CFSSL_AUTH:
              Certificates are
            issued by CFSSL authenticated signing service.
              The users must
            provide their own CFSSL host_url and credentials.
        :type issuer_type: str
        :param name: (Required) Certificate issuer name, unique per account.
        :type name: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._created_at = fields.DateTimeField(value=created_at)
        self._description = fields.StringField(value=description)
        self._id = fields.StringField(value=id)
        self._issuer_attributes = fields.DictField(value=issuer_attributes)
        self._issuer_type = fields.StringField(
            value=issuer_type, enum=enums.CertificateIssuerTypeEnum)
        self._name = fields.StringField(value=name)
예제 #13
0
    def __init__(
        self,
        _client=None,
        account_id=None,
        certificate=None,
        created_at=None,
        description=None,
        developer_private_key=None,
        id=None,
        name=None,
        security_file_content=None,
    ):
        """Creates a local `DeveloperCertificate` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: Account to which the developer certificate belongs.
        :type account_id: str
        :param certificate: PEM-format X.509 developer certificate.
        :type certificate: str
        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param description: Description for the developer certificate.
        :type description: str
        :param developer_private_key: PEM-format developer private key associated with the certificate.
        :type developer_private_key: str
        :param id: (Required) ID that uniquely identifies the developer certificate.
        :type id: str
        :param name: (Required) Name of the developer certificate.
        :type name: str
        :param security_file_content: Content of the `security.c` file flashed to the device to provide
            security credentials.
        :type security_file_content: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._certificate = fields.StringField(value=certificate)
        self._created_at = fields.DateTimeField(value=created_at)
        self._description = fields.StringField(value=description)
        self._developer_private_key = fields.StringField(
            value=developer_private_key)
        self._id = fields.StringField(value=id)
        self._name = fields.StringField(value=name)
        self._security_file_content = fields.StringField(
            value=security_file_content)
    def __init__(self,
                 _client=None,
                 certificate_issuer_id=None,
                 created_at=None,
                 id=None,
                 reference=None,
                 updated_at=None):
        """Creates a local `CertificateIssuerConfig` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param certificate_issuer_id: (Required) The ID of the certificate issuer.
            Null if Device Management
            internal HSM is used.
        :type certificate_issuer_id: str
        :param created_at: Created UTC time RFC3339.
        :type created_at: datetime
        :param id: (Required) The ID of the certificate issuer configuration.
        :type id: str
        :param reference: (Required) The certificate name to which the certificate issuer configuration
            applies.
        :type reference: str
        :param updated_at: Updated UTC time RFC3339.
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._certificate_issuer_id = fields.StringField(
            value=certificate_issuer_id)
        self._created_at = fields.DateTimeField(value=created_at)
        self._id = fields.StringField(value=id)
        self._reference = fields.StringField(value=reference)
        self._updated_at = fields.DateTimeField(value=updated_at)
예제 #15
0
    def __init__(
        self,
        _client=None,
        campaign_id=None,
        count=None,
        created_at=None,
        description=None,
        event_type=None,
        id=None,
        summary_status=None,
        summary_status_id=None,
    ):
        """Creates a local `CampaignStatisticsEvents` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param campaign_id: (Required) ID of the associated campaign.
        :type campaign_id: str
        :param count: 
        :type count: int
        :param created_at: 
        :type created_at: datetime
        :param description: 
        :type description: str
        :param event_type: 
        :type event_type: str
        :param id: (Required) 
        :type id: str
        :param summary_status: 
        :type summary_status: str
        :param summary_status_id: (Required) 
        :type summary_status_id: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._campaign_id = fields.StringField(value=campaign_id)
        self._count = fields.IntegerField(value=count)
        self._created_at = fields.DateTimeField(value=created_at)
        self._description = fields.StringField(value=description)
        self._event_type = fields.StringField(value=event_type)
        self._id = fields.StringField(value=id)
        self._summary_status = fields.StringField(value=summary_status)
        self._summary_status_id = fields.StringField(value=summary_status_id)
    def __init__(self,
                 _client=None,
                 account_id=None,
                 created_at=None,
                 endpoint_name=None,
                 id=None,
                 trusted_certificate_id=None):
        """Creates a local `DeviceEnrollmentDenial` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: account id
        :type account_id: str
        :param created_at: date on which the failed bootstrap was attempted on
        :type created_at: datetime
        :param endpoint_name: endpoint name
        :type endpoint_name: str
        :param id: id of the recorded failed bootstrap attempt
        :type id: str
        :param trusted_certificate_id: Trusted certificate id
        :type trusted_certificate_id: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._created_at = fields.DateTimeField(value=created_at)
        self._endpoint_name = fields.StringField(value=endpoint_name)
        self._id = fields.StringField(value=id)
        self._trusted_certificate_id = fields.StringField(
            value=trusted_certificate_id)
예제 #17
0
    def __init__(self,
                 _client=None,
                 account_id=None,
                 ip_address=None,
                 login_time=None,
                 reference_token=None,
                 user_agent=None):
        """Creates a local `ActiveSession` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: The UUID of the account.
        :type account_id: str
        :param ip_address: IP address of the client.
        :type ip_address: str
        :param login_time: The login time of the user.
        :type login_time: datetime
        :param reference_token: The reference token.
        :type reference_token: str
        :param user_agent: User Agent header from the login request.
        :type user_agent: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._ip_address = fields.StringField(value=ip_address)
        self._login_time = fields.DateTimeField(value=login_time)
        self._reference_token = fields.StringField(value=reference_token)
        self._user_agent = fields.StringField(value=user_agent)
예제 #18
0
    def __init__(
        self,
        _client=None,
        autostop_reason=None,
        created_at=None,
        description=None,
        device_filter=None,
        device_filter_helper=None,
        finished=None,
        id=None,
        name=None,
        phase=None,
        root_manifest_id=None,
        root_manifest_url=None,
        started_at=None,
        updated_at=None,
        when=None,
    ):
        """Creates a local `UpdateCampaign` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param autostop_reason: Text description of why a campaign failed to start or why a
            campaign stopped.
        :type autostop_reason: str
        :param created_at: The time the update campaign was created
        :type created_at: datetime
        :param description: An optional description of the campaign
        :type description: str
        :param device_filter: (Required) The filter for the devices the campaign is targeting at
        :type device_filter: str
        :param device_filter_helper: Helper for creating the device filter string.
        :type device_filter_helper: mbed_cloud.client.api_filter.ApiFilter
        :param finished: The campaign finish timestamp
        :type finished: datetime
        :param id: (Required) The campaign ID
        :type id: str
        :param name: The campaign name
        :type name: str
        :param phase: The current phase of the campaign.
        :type phase: str
        :param root_manifest_id: 
        :type root_manifest_id: str
        :param root_manifest_url: 
        :type root_manifest_url: str
        :param started_at: 
        :type started_at: datetime
        :param updated_at: The time the object was updated
        :type updated_at: datetime
        :param when: The scheduled start time for the campaign. The campaign will start
            within 1 minute when then start time has elapsed.
        :type when: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._autostop_reason = fields.StringField(value=autostop_reason)
        self._created_at = fields.DateTimeField(value=created_at)
        self._description = fields.StringField(value=description)
        self._device_filter = fields.StringField(value=device_filter)
        self._device_filter_helper = fields.DictField(
            value=device_filter_helper)
        self._finished = fields.DateTimeField(value=finished)
        self._id = fields.StringField(value=id)
        self._name = fields.StringField(value=name)
        self._phase = fields.StringField(value=phase)
        self._root_manifest_id = fields.StringField(value=root_manifest_id)
        self._root_manifest_url = fields.StringField(value=root_manifest_url)
        self._started_at = fields.DateTimeField(value=started_at)
        self._updated_at = fields.DateTimeField(value=updated_at)
        self._when = fields.DateTimeField(value=when)
예제 #19
0
    def __init__(
        self,
        _client=None,
        account_id=None,
        active_sessions=None,
        address=None,
        created_at=None,
        creation_time=None,
        custom_fields=None,
        email=None,
        email_verified=None,
        full_name=None,
        id=None,
        is_gtc_accepted=None,
        is_marketing_accepted=None,
        is_totp_enabled=None,
        last_login_time=None,
        login_history=None,
        login_profiles=None,
        password=None,
        password_changed_time=None,
        phone_number=None,
        status=None,
        totp_scratch_codes=None,
        updated_at=None,
        username=None,
    ):
        """Creates a local `User` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: The ID of the account.
        :type account_id: str
        :param active_sessions: List of active user sessions.
        :type active_sessions: list
        :param address: Address.
        :type address: str
        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param creation_time: A timestamp of the user creation in the storage, in milliseconds.
        :type creation_time: int
        :param custom_fields: User's account-specific custom properties. The value is a string.
        :type custom_fields: dict
        :param email: (Required) The email address.
        :type email: str
        :param email_verified: A flag indicating whether the user's email address has been
            verified or not.
        :type email_verified: bool
        :param full_name: The full name of the user.
        :type full_name: str
        :param id: (Required) The ID of the user.
        :type id: str
        :param is_gtc_accepted: A flag indicating that the user has accepted General Terms and
            Conditions.
        :type is_gtc_accepted: bool
        :param is_marketing_accepted: A flag indicating that the user has consented to receive marketing
            information.
        :type is_marketing_accepted: bool
        :param is_totp_enabled: A flag indicating whether two-factor authentication (TOTP) has
            been enabled.
        :type is_totp_enabled: bool
        :param last_login_time: A timestamp of the latest login of the user, in milliseconds.
        :type last_login_time: int
        :param login_history: Timestamps, succeedings, IP addresses and user agent information
            of the last five logins of the user, with timestamps in RFC3339
            format.
        :type login_history: list
        :param login_profiles: A list of login profiles for the user. Specified as the identity
            providers the user is associated with.
        :type login_profiles: list
        :param password: The password when creating a new user. It will be generated when
            not present in the request.
        :type password: str
        :param password_changed_time: A timestamp of the latest change of the user password, in
            milliseconds.
        :type password_changed_time: int
        :param phone_number: Phone number.
        :type phone_number: str
        :param status: The status of the user. ENROLLING state indicates that the user is
            in the middle of the enrollment process. INVITED means that the
            user has not accepted the invitation request. RESET means that the
            password must be changed immediately. INACTIVE users are locked
            out and not permitted to use the system.
        :type status: str
        :param totp_scratch_codes: A list of scratch codes for the two-factor authentication. Visible
            only when 2FA is requested to be enabled or the codes regenerated.
        :type totp_scratch_codes: list
        :param updated_at: Last update UTC time RFC3339.
        :type updated_at: datetime
        :param username: A username.
        :type username: str
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        from mbed_cloud.foundation.entities.accounts.active_session import ActiveSession
        from mbed_cloud.foundation.entities.accounts.login_history import LoginHistory
        from mbed_cloud.foundation.entities.accounts.login_profile import LoginProfile

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._active_sessions = fields.ListField(value=active_sessions,
                                                 entity=ActiveSession)
        self._address = fields.StringField(value=address)
        self._created_at = fields.DateTimeField(value=created_at)
        self._creation_time = fields.IntegerField(value=creation_time)
        self._custom_fields = fields.DictField(value=custom_fields)
        self._email = fields.StringField(value=email)
        self._email_verified = fields.BooleanField(value=email_verified)
        self._full_name = fields.StringField(value=full_name)
        self._id = fields.StringField(value=id)
        self._is_gtc_accepted = fields.BooleanField(value=is_gtc_accepted)
        self._is_marketing_accepted = fields.BooleanField(
            value=is_marketing_accepted)
        self._is_totp_enabled = fields.BooleanField(value=is_totp_enabled)
        self._last_login_time = fields.IntegerField(value=last_login_time)
        self._login_history = fields.ListField(value=login_history,
                                               entity=LoginHistory)
        self._login_profiles = fields.ListField(value=login_profiles,
                                                entity=LoginProfile)
        self._password = fields.StringField(value=password)
        self._password_changed_time = fields.IntegerField(
            value=password_changed_time)
        self._phone_number = fields.StringField(value=phone_number)
        self._status = fields.StringField(value=status,
                                          enum=enums.UserStatusEnum)
        self._totp_scratch_codes = fields.ListField(value=totp_scratch_codes)
        self._updated_at = fields.DateTimeField(value=updated_at)
        self._username = fields.StringField(value=username)
 def test_datetime_string_with_offset(self):
     field = fields.DateTimeField(value="2019-03-28T23:58:00-02:00")
     self.assertEqual(field.to_api(), "2019-03-29T01:58:00Z")
     self.assertEqual(field.to_literal(), "2019-03-28T23:58:00-02:00")
 def test_datetime_object_with_tz(self):
     field = fields.DateTimeField(
         value=datetime.datetime(2019, 3, 28, 23, 58, 0, tzinfo=TZ()))
     self.assertEqual(field.to_api(), "2019-03-29T01:58:00Z")
     self.assertEqual(field.to_literal(), "2019-03-28T23:58:00-02:00")
예제 #22
0
    def __init__(
        self,
        _client=None,
        changes=None,
        created_at=None,
        data=None,
        date_time=None,
        description=None,
        device_id=None,
        event_type=None,
        event_type_category=None,
        event_type_description=None,
        id=None,
        state_change=None,
    ):
        """Creates a local `DeviceEvents` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param changes: 
        :type changes: dict
        :param created_at: 
        :type created_at: datetime
        :param data: Additional data relevant to the event.
        :type data: dict
        :param date_time: 
        :type date_time: datetime
        :param description: 
        :type description: str
        :param device_id: 
        :type device_id: str
        :param event_type: Event code
        :type event_type: str
        :param event_type_category: Category code which groups the event type by a summary category.
        :type event_type_category: str
        :param event_type_description: Generic description of the event
        :type event_type_description: str
        :param id: (Required) 
        :type id: str
        :param state_change: 
        :type state_change: bool
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._changes = fields.DictField(value=changes)
        self._created_at = fields.DateTimeField(value=created_at)
        self._data = fields.DictField(value=data)
        self._date_time = fields.DateTimeField(value=date_time)
        self._description = fields.StringField(value=description)
        self._device_id = fields.StringField(value=device_id)
        self._event_type = fields.StringField(value=event_type)
        self._event_type_category = fields.StringField(
            value=event_type_category)
        self._event_type_description = fields.StringField(
            value=event_type_description)
        self._id = fields.StringField(value=id)
        self._state_change = fields.BooleanField(value=state_change)
예제 #23
0
    def __init__(
        self,
        _client=None,
        account_id=None,
        completed_at=None,
        created_at=None,
        errors_count=None,
        errors_report_file=None,
        full_report_file=None,
        id=None,
        processed_count=None,
        status=None,
        total_count=None,
    ):
        """Creates a local `DeviceEnrollmentBulkCreate` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: ID
        :type account_id: str
        :param completed_at: The time the bulk creation task was completed.
            Null when creating
            bulk upload or delete.
        :type completed_at: datetime
        :param created_at: The time of receiving the bulk creation task.
        :type created_at: datetime
        :param errors_count: The number of enrollment identities with failed processing.
        :type errors_count: int
        :param errors_report_file: Link to error report file.
            Null when creating bulk upload or
            delete.
        :type errors_report_file: str
        :param full_report_file: Link to full report file.
            Null when creating bulk upload or
            delete.
        :type full_report_file: str
        :param id: (Required) Bulk ID
        :type id: str
        :param processed_count: The number of enrollment identities processed until now.
        :type processed_count: int
        :param status: The state of the process is 'new' at the time of creation. If
            creation is still in progress, the state shows as 'processing'.
            When the request is fully processed, the state changes to
            'completed'.
        :type status: str
        :param total_count: Total number of enrollment identities found in the input CSV.
        :type total_count: int
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._completed_at = fields.DateTimeField(value=completed_at)
        self._created_at = fields.DateTimeField(value=created_at)
        self._errors_count = fields.IntegerField(value=errors_count)
        self._errors_report_file = fields.StringField(value=errors_report_file)
        self._full_report_file = fields.StringField(value=full_report_file)
        self._id = fields.StringField(value=id)
        self._processed_count = fields.IntegerField(value=processed_count)
        self._status = fields.StringField(
            value=status, enum=enums.DeviceEnrollmentBulkCreateStatusEnum)
        self._total_count = fields.IntegerField(value=total_count)
예제 #24
0
    def __init__(
        self,
        _client=None,
        account_id=None,
        created_at=None,
        creation_time=None,
        id=None,
        key=None,
        last_login_time=None,
        name=None,
        owner=None,
        status=None,
        updated_at=None,
    ):
        """Creates a local `SubtenantApiKey` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: (Required) The ID of the account.
        :type account_id: str
        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param creation_time: The timestamp of the API key creation in the storage, in
            milliseconds.
        :type creation_time: int
        :param id: (Required) The ID of the API key.
        :type id: str
        :param key: The API key.
        :type key: str
        :param last_login_time: The timestamp of the latest API key usage, in milliseconds.
        :type last_login_time: int
        :param name: (Required) The display name for the API key.
        :type name: str
        :param owner: The owner of this API key, who is the creator by default.
        :type owner: str
        :param status: The status of the API key.
        :type status: str
        :param updated_at: Last update UTC time RFC3339.
        :type updated_at: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._created_at = fields.DateTimeField(value=created_at)
        self._creation_time = fields.IntegerField(value=creation_time)
        self._id = fields.StringField(value=id)
        self._key = fields.StringField(value=key)
        self._last_login_time = fields.IntegerField(value=last_login_time)
        self._name = fields.StringField(value=name)
        self._owner = fields.StringField(value=owner)
        self._status = fields.StringField(value=status,
                                          enum=enums.SubtenantApiKeyStatusEnum)
        self._updated_at = fields.DateTimeField(value=updated_at)
 def test_datetime_object(self):
     field = fields.DateTimeField(
         value=datetime.datetime(2019, 3, 28, 23, 58, 0))
     self.assertEqual(field.to_api(), "2019-03-28T23:58:00Z")
     self.assertEqual(field.to_literal(), "2019-03-28T23:58:00")
    def __init__(
        self,
        _client=None,
        account_id=None,
        certificate=None,
        certificate_fingerprint=None,
        created_at=None,
        description=None,
        device_execution_mode=None,
        enrollment_mode=None,
        id=None,
        is_developer_certificate=None,
        issuer=None,
        name=None,
        owner_id=None,
        service=None,
        status=None,
        subject=None,
        updated_at=None,
        valid=None,
        validity=None,
    ):
        """Creates a local `SubtenantTrustedCertificate` instance

        Parameters can be supplied on creation of the instance or given by
        setting the properties on the instance after creation.

        Parameters marked as `required` must be set for one or more operations
        on the entity. For details on when they are required please see the
        documentation for the setter method.

        :param account_id: (Required) The ID of the account.
        :type account_id: str
        :param certificate: (Required) X509.v3 trusted certificate in PEM format.
        :type certificate: str
        :param certificate_fingerprint: A SHA-256 fingerprint of the certificate.
        :type certificate_fingerprint: str
        :param created_at: Creation UTC time RFC3339.
        :type created_at: datetime
        :param description: Human readable description of this certificate.
        :type description: str
        :param device_execution_mode: Device execution mode where 1 means a developer certificate.
        :type device_execution_mode: int
        :param enrollment_mode: If true, signature is not required. Default value false.
        :type enrollment_mode: bool
        :param id: (Required) Entity ID.
        :type id: str
        :param is_developer_certificate: Whether or not this certificate is a developer certificate.
        :type is_developer_certificate: bool
        :param issuer: Issuer of the certificate.
        :type issuer: str
        :param name: (Required) Certificate name.
        :type name: str
        :param owner_id: The ID of the owner.
        :type owner_id: str
        :param service: (Required) Service name where the certificate is used.
        :type service: str
        :param status: Status of the certificate.
        :type status: str
        :param subject: Subject of the certificate.
        :type subject: str
        :param updated_at: Last update UTC time RFC3339.
        :type updated_at: datetime
        :param valid: This read-only flag indicates whether the certificate is valid or
            not.
        :type valid: bool
        :param validity: Expiration time in UTC formatted as RFC3339.
        :type validity: datetime
        """

        super().__init__(_client=_client)

        # inline imports for avoiding circular references and bulk imports

        # fields
        self._account_id = fields.StringField(value=account_id)
        self._certificate = fields.StringField(value=certificate)
        self._certificate_fingerprint = fields.StringField(value=certificate_fingerprint)
        self._created_at = fields.DateTimeField(value=created_at)
        self._description = fields.StringField(value=description)
        self._device_execution_mode = fields.IntegerField(value=device_execution_mode)
        self._enrollment_mode = fields.BooleanField(value=enrollment_mode)
        self._id = fields.StringField(value=id)
        self._is_developer_certificate = fields.BooleanField(value=is_developer_certificate)
        self._issuer = fields.StringField(value=issuer)
        self._name = fields.StringField(value=name)
        self._owner_id = fields.StringField(value=owner_id)
        self._service = fields.StringField(value=service, enum=enums.SubtenantTrustedCertificateServiceEnum)
        self._status = fields.StringField(value=status, enum=enums.SubtenantTrustedCertificateStatusEnum)
        self._subject = fields.StringField(value=subject)
        self._updated_at = fields.DateTimeField(value=updated_at)
        self._valid = fields.BooleanField(value=valid)
        self._validity = fields.DateTimeField(value=validity)