Class DeviceCredential.Builder

  • All Implemented Interfaces:
    DeviceCredentialOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    DeviceCredential

    public static final class DeviceCredential.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
    implements DeviceCredentialOrBuilder
     A server-stored device credential used for authentication.
     
    Protobuf type google.cloud.iot.v1.DeviceCredential
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • clear

        public DeviceCredential.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • getDefaultInstanceForType

        public DeviceCredential getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public DeviceCredential build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public DeviceCredential buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public DeviceCredential.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • setField

        public DeviceCredential.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                 Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • clearField

        public DeviceCredential.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • clearOneof

        public DeviceCredential.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • setRepeatedField

        public DeviceCredential.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         int index,
                                                         Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • addRepeatedField

        public DeviceCredential.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                         Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • mergeFrom

        public DeviceCredential.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DeviceCredential.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • mergeFrom

        public DeviceCredential.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<DeviceCredential.Builder>
        Throws:
        IOException
      • hasPublicKey

        public boolean hasPublicKey()
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
        Specified by:
        hasPublicKey in interface DeviceCredentialOrBuilder
        Returns:
        Whether the publicKey field is set.
      • getPublicKey

        public PublicKeyCredential getPublicKey()
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
        Specified by:
        getPublicKey in interface DeviceCredentialOrBuilder
        Returns:
        The publicKey.
      • setPublicKey

        public DeviceCredential.Builder setPublicKey​(PublicKeyCredential value)
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
      • setPublicKey

        public DeviceCredential.Builder setPublicKey​(PublicKeyCredential.Builder builderForValue)
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
      • mergePublicKey

        public DeviceCredential.Builder mergePublicKey​(PublicKeyCredential value)
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
      • clearPublicKey

        public DeviceCredential.Builder clearPublicKey()
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
      • getPublicKeyBuilder

        public PublicKeyCredential.Builder getPublicKeyBuilder()
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
      • getPublicKeyOrBuilder

        public PublicKeyCredentialOrBuilder getPublicKeyOrBuilder()
         A public key used to verify the signature of JSON Web Tokens (JWTs).
         When adding a new device credential, either via device creation or via
         modifications, this public key credential may be required to be signed by
         one of the registry level certificates. More specifically, if the
         registry contains at least one certificate, any new device credential
         must be signed by one of the registry certificates. As a result,
         when the registry contains certificates, only X.509 certificates are
         accepted as device credentials. However, if the registry does
         not contain a certificate, self-signed certificates and public keys will
         be accepted. New device credentials must be different from every
         registry-level certificate.
         
        .google.cloud.iot.v1.PublicKeyCredential public_key = 2;
        Specified by:
        getPublicKeyOrBuilder in interface DeviceCredentialOrBuilder
      • hasExpirationTime

        public boolean hasExpirationTime()
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
        Specified by:
        hasExpirationTime in interface DeviceCredentialOrBuilder
        Returns:
        Whether the expirationTime field is set.
      • getExpirationTime

        public com.google.protobuf.Timestamp getExpirationTime()
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
        Specified by:
        getExpirationTime in interface DeviceCredentialOrBuilder
        Returns:
        The expirationTime.
      • setExpirationTime

        public DeviceCredential.Builder setExpirationTime​(com.google.protobuf.Timestamp value)
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
      • setExpirationTime

        public DeviceCredential.Builder setExpirationTime​(com.google.protobuf.Timestamp.Builder builderForValue)
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
      • mergeExpirationTime

        public DeviceCredential.Builder mergeExpirationTime​(com.google.protobuf.Timestamp value)
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
      • clearExpirationTime

        public DeviceCredential.Builder clearExpirationTime()
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
      • getExpirationTimeBuilder

        public com.google.protobuf.Timestamp.Builder getExpirationTimeBuilder()
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
      • getExpirationTimeOrBuilder

        public com.google.protobuf.TimestampOrBuilder getExpirationTimeOrBuilder()
         [Optional] The time at which this credential becomes invalid. This
         credential will be ignored for new client authentication requests after
         this timestamp; however, it will not be automatically deleted.
         
        .google.protobuf.Timestamp expiration_time = 6;
        Specified by:
        getExpirationTimeOrBuilder in interface DeviceCredentialOrBuilder
      • setUnknownFields

        public final DeviceCredential.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>
      • mergeUnknownFields

        public final DeviceCredential.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<DeviceCredential.Builder>