Class Resource.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Resource.Builder>
com.google.cloud.config.v1.Resource.Builder
All Implemented Interfaces:
ResourceOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Resource

public static final class Resource.Builder extends com.google.protobuf.GeneratedMessage.Builder<Resource.Builder> implements ResourceOrBuilder
 Resource represents a Google Cloud Platform resource actuated by IM.
 Resources are child resources of Revisions.
 
Protobuf type google.cloud.config.v1.Resource
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Resource.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<Resource.Builder>
    • internalGetFieldAccessorTable

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

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

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

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

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

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

      public Resource.Builder mergeFrom(Resource other)
    • isInitialized

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

      public Resource.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<Resource.Builder>
      Throws:
      IOException
    • getName

      public String getName()
       Output only. Resource name.
       Format:
       `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface ResourceOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. Resource name.
       Format:
       `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface ResourceOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Resource.Builder setName(String value)
       Output only. Resource name.
       Format:
       `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Resource.Builder clearName()
       Output only. Resource name.
       Format:
       `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Resource.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. Resource name.
       Format:
       `projects/{project}/locations/{location}/deployments/{deployment}/revisions/{revision}/resources/{resource}`
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasTerraformInfo

      public boolean hasTerraformInfo()
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasTerraformInfo in interface ResourceOrBuilder
      Returns:
      Whether the terraformInfo field is set.
    • getTerraformInfo

      public ResourceTerraformInfo getTerraformInfo()
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTerraformInfo in interface ResourceOrBuilder
      Returns:
      The terraformInfo.
    • setTerraformInfo

      public Resource.Builder setTerraformInfo(ResourceTerraformInfo value)
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setTerraformInfo

      public Resource.Builder setTerraformInfo(ResourceTerraformInfo.Builder builderForValue)
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeTerraformInfo

      public Resource.Builder mergeTerraformInfo(ResourceTerraformInfo value)
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearTerraformInfo

      public Resource.Builder clearTerraformInfo()
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getTerraformInfoBuilder

      public ResourceTerraformInfo.Builder getTerraformInfoBuilder()
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getTerraformInfoOrBuilder

      public ResourceTerraformInfoOrBuilder getTerraformInfoOrBuilder()
       Output only. Terraform-specific info if this resource was created using
       Terraform.
       
      .google.cloud.config.v1.ResourceTerraformInfo terraform_info = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getTerraformInfoOrBuilder in interface ResourceOrBuilder
    • getCaiAssetsCount

      public int getCaiAssetsCount()
      Description copied from interface: ResourceOrBuilder
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCaiAssetsCount in interface ResourceOrBuilder
    • containsCaiAssets

      public boolean containsCaiAssets(String key)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      containsCaiAssets in interface ResourceOrBuilder
    • getCaiAssets

      @Deprecated public Map<String,ResourceCAIInfo> getCaiAssets()
      Deprecated.
      Use getCaiAssetsMap() instead.
      Specified by:
      getCaiAssets in interface ResourceOrBuilder
    • getCaiAssetsMap

      public Map<String,ResourceCAIInfo> getCaiAssetsMap()
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCaiAssetsMap in interface ResourceOrBuilder
    • getCaiAssetsOrDefault

      public ResourceCAIInfo getCaiAssetsOrDefault(String key, ResourceCAIInfo defaultValue)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCaiAssetsOrDefault in interface ResourceOrBuilder
    • getCaiAssetsOrThrow

      public ResourceCAIInfo getCaiAssetsOrThrow(String key)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getCaiAssetsOrThrow in interface ResourceOrBuilder
    • clearCaiAssets

      public Resource.Builder clearCaiAssets()
    • removeCaiAssets

      public Resource.Builder removeCaiAssets(String key)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getMutableCaiAssets

      @Deprecated public Map<String,ResourceCAIInfo> getMutableCaiAssets()
      Deprecated.
      Use alternate mutation accessors instead.
    • putCaiAssets

      public Resource.Builder putCaiAssets(String key, ResourceCAIInfo value)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • putAllCaiAssets

      public Resource.Builder putAllCaiAssets(Map<String,ResourceCAIInfo> values)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • putCaiAssetsBuilderIfAbsent

      public ResourceCAIInfo.Builder putCaiAssetsBuilderIfAbsent(String key)
       Output only. Map of Cloud Asset Inventory (CAI) type to CAI info (e.g. CAI
       ID). CAI type format follows
       https://cloud.google.com/asset-inventory/docs/supported-asset-types
       
      map<string, .google.cloud.config.v1.ResourceCAIInfo> cai_assets = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getIntentValue

      public int getIntentValue()
       Output only. Intent of the resource.
       
      .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getIntentValue in interface ResourceOrBuilder
      Returns:
      The enum numeric value on the wire for intent.
    • setIntentValue

      public Resource.Builder setIntentValue(int value)
       Output only. Intent of the resource.
       
      .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for intent to set.
      Returns:
      This builder for chaining.
    • getIntent

      public Resource.Intent getIntent()
       Output only. Intent of the resource.
       
      .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getIntent in interface ResourceOrBuilder
      Returns:
      The intent.
    • setIntent

      public Resource.Builder setIntent(Resource.Intent value)
       Output only. Intent of the resource.
       
      .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The intent to set.
      Returns:
      This builder for chaining.
    • clearIntent

      public Resource.Builder clearIntent()
       Output only. Intent of the resource.
       
      .google.cloud.config.v1.Resource.Intent intent = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getStateValue

      public int getStateValue()
       Output only. Current state of the resource.
       
      .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getStateValue in interface ResourceOrBuilder
      Returns:
      The enum numeric value on the wire for state.
    • setStateValue

      public Resource.Builder setStateValue(int value)
       Output only. Current state of the resource.
       
      .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for state to set.
      Returns:
      This builder for chaining.
    • getState

      public Resource.State getState()
       Output only. Current state of the resource.
       
      .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getState in interface ResourceOrBuilder
      Returns:
      The state.
    • setState

      public Resource.Builder setState(Resource.State value)
       Output only. Current state of the resource.
       
      .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The state to set.
      Returns:
      This builder for chaining.
    • clearState

      public Resource.Builder clearState()
       Output only. Current state of the resource.
       
      .google.cloud.config.v1.Resource.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.