Class VersionedResource.Builder

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

    public static final class VersionedResource.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<VersionedResource.Builder>
    implements VersionedResourceOrBuilder
     Resource representation as defined by the corresponding service providing the
     resource for a given API version.
     
    Protobuf type google.cloud.asset.v1.VersionedResource
    • 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<VersionedResource.Builder>
      • clear

        public VersionedResource.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<VersionedResource.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<VersionedResource.Builder>
      • getDefaultInstanceForType

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

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

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

        public VersionedResource.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<VersionedResource.Builder>
      • setField

        public VersionedResource.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<VersionedResource.Builder>
      • clearField

        public VersionedResource.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<VersionedResource.Builder>
      • clearOneof

        public VersionedResource.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<VersionedResource.Builder>
      • setRepeatedField

        public VersionedResource.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<VersionedResource.Builder>
      • addRepeatedField

        public VersionedResource.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<VersionedResource.Builder>
      • mergeFrom

        public VersionedResource.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<VersionedResource.Builder>
      • isInitialized

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

        public VersionedResource.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<VersionedResource.Builder>
        Throws:
        IOException
      • getVersion

        public String getVersion()
         API version of the resource.
        
         Example:
         If the resource is an instance provided by Compute Engine v1 API as defined
         in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
         version will be "v1".
         
        string version = 1;
        Specified by:
        getVersion in interface VersionedResourceOrBuilder
        Returns:
        The version.
      • getVersionBytes

        public com.google.protobuf.ByteString getVersionBytes()
         API version of the resource.
        
         Example:
         If the resource is an instance provided by Compute Engine v1 API as defined
         in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
         version will be "v1".
         
        string version = 1;
        Specified by:
        getVersionBytes in interface VersionedResourceOrBuilder
        Returns:
        The bytes for version.
      • setVersion

        public VersionedResource.Builder setVersion​(String value)
         API version of the resource.
        
         Example:
         If the resource is an instance provided by Compute Engine v1 API as defined
         in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
         version will be "v1".
         
        string version = 1;
        Parameters:
        value - The version to set.
        Returns:
        This builder for chaining.
      • clearVersion

        public VersionedResource.Builder clearVersion()
         API version of the resource.
        
         Example:
         If the resource is an instance provided by Compute Engine v1 API as defined
         in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
         version will be "v1".
         
        string version = 1;
        Returns:
        This builder for chaining.
      • setVersionBytes

        public VersionedResource.Builder setVersionBytes​(com.google.protobuf.ByteString value)
         API version of the resource.
        
         Example:
         If the resource is an instance provided by Compute Engine v1 API as defined
         in `https://cloud.google.com/compute/docs/reference/rest/v1/instances`,
         version will be "v1".
         
        string version = 1;
        Parameters:
        value - The bytes for version to set.
        Returns:
        This builder for chaining.
      • hasResource

        public boolean hasResource()
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
        Specified by:
        hasResource in interface VersionedResourceOrBuilder
        Returns:
        Whether the resource field is set.
      • getResource

        public com.google.protobuf.Struct getResource()
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
        Specified by:
        getResource in interface VersionedResourceOrBuilder
        Returns:
        The resource.
      • setResource

        public VersionedResource.Builder setResource​(com.google.protobuf.Struct value)
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
      • setResource

        public VersionedResource.Builder setResource​(com.google.protobuf.Struct.Builder builderForValue)
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
      • mergeResource

        public VersionedResource.Builder mergeResource​(com.google.protobuf.Struct value)
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
      • clearResource

        public VersionedResource.Builder clearResource()
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
      • getResourceBuilder

        public com.google.protobuf.Struct.Builder getResourceBuilder()
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
      • getResourceOrBuilder

        public com.google.protobuf.StructOrBuilder getResourceOrBuilder()
         JSON representation of the resource as defined by the corresponding
         service providing this resource.
        
         Example:
         If the resource is an instance provided by Compute Engine, this field will
         contain the JSON representation of the instance as defined by Compute
         Engine:
         `https://cloud.google.com/compute/docs/reference/rest/v1/instances`.
        
         You can find the resource definition for each supported resource type in
         this table:
         `https://cloud.google.com/asset-inventory/docs/supported-asset-types#searchable_asset_types`
         
        .google.protobuf.Struct resource = 2;
        Specified by:
        getResourceOrBuilder in interface VersionedResourceOrBuilder
      • setUnknownFields

        public final VersionedResource.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<VersionedResource.Builder>
      • mergeUnknownFields

        public final VersionedResource.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<VersionedResource.Builder>