Class Settings.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<Settings.Builder>
com.google.logging.v2.Settings.Builder
All Implemented Interfaces:
SettingsOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Settings

public static final class Settings.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Settings.Builder> implements SettingsOrBuilder
 Describes the settings associated with a project, folder, organization,
 billing account, or flexible resource.
 
Protobuf type google.logging.v2.Settings
  • Method Details

    • 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<Settings.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public Settings.Builder mergeFrom(Settings other)
    • isInitialized

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

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

      public String getName()
       Output only. The resource name of the settings.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getName in interface SettingsOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Output only. The resource name of the settings.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getNameBytes in interface SettingsOrBuilder
      Returns:
      The bytes for name.
    • setName

      public Settings.Builder setName(String value)
       Output only. The resource name of the settings.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

      public Settings.Builder clearName()
       Output only. The resource name of the settings.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setNameBytes

      public Settings.Builder setNameBytes(com.google.protobuf.ByteString value)
       Output only. The resource name of the settings.
       
      string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getKmsKeyName

      public String getKmsKeyName()
       Optional. The resource name for the configured Cloud KMS key.
      
       KMS key name format:
      
           "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
      
       For example:
      
         `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
      
      
      
       To enable CMEK for the Log Router, set this field to a valid
       `kms_key_name` for which the associated service account has the required
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
      
       The Cloud KMS key used by the Log Router can be updated by changing the
       `kms_key_name` to a new valid key name. Encryption operations that are in
       progress will be completed with the key that was in use when they started.
       Decryption operations will be completed using the key that was used at the
       time of encryption unless access to that key has been revoked.
      
       To disable CMEK for the Log Router, set this field to an empty string.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getKmsKeyName in interface SettingsOrBuilder
      Returns:
      The kmsKeyName.
    • getKmsKeyNameBytes

      public com.google.protobuf.ByteString getKmsKeyNameBytes()
       Optional. The resource name for the configured Cloud KMS key.
      
       KMS key name format:
      
           "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
      
       For example:
      
         `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
      
      
      
       To enable CMEK for the Log Router, set this field to a valid
       `kms_key_name` for which the associated service account has the required
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
      
       The Cloud KMS key used by the Log Router can be updated by changing the
       `kms_key_name` to a new valid key name. Encryption operations that are in
       progress will be completed with the key that was in use when they started.
       Decryption operations will be completed using the key that was used at the
       time of encryption unless access to that key has been revoked.
      
       To disable CMEK for the Log Router, set this field to an empty string.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getKmsKeyNameBytes in interface SettingsOrBuilder
      Returns:
      The bytes for kmsKeyName.
    • setKmsKeyName

      public Settings.Builder setKmsKeyName(String value)
       Optional. The resource name for the configured Cloud KMS key.
      
       KMS key name format:
      
           "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
      
       For example:
      
         `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
      
      
      
       To enable CMEK for the Log Router, set this field to a valid
       `kms_key_name` for which the associated service account has the required
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
      
       The Cloud KMS key used by the Log Router can be updated by changing the
       `kms_key_name` to a new valid key name. Encryption operations that are in
       progress will be completed with the key that was in use when they started.
       Decryption operations will be completed using the key that was used at the
       time of encryption unless access to that key has been revoked.
      
       To disable CMEK for the Log Router, set this field to an empty string.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The kmsKeyName to set.
      Returns:
      This builder for chaining.
    • clearKmsKeyName

      public Settings.Builder clearKmsKeyName()
       Optional. The resource name for the configured Cloud KMS key.
      
       KMS key name format:
      
           "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
      
       For example:
      
         `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
      
      
      
       To enable CMEK for the Log Router, set this field to a valid
       `kms_key_name` for which the associated service account has the required
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
      
       The Cloud KMS key used by the Log Router can be updated by changing the
       `kms_key_name` to a new valid key name. Encryption operations that are in
       progress will be completed with the key that was in use when they started.
       Decryption operations will be completed using the key that was used at the
       time of encryption unless access to that key has been revoked.
      
       To disable CMEK for the Log Router, set this field to an empty string.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setKmsKeyNameBytes

      public Settings.Builder setKmsKeyNameBytes(com.google.protobuf.ByteString value)
       Optional. The resource name for the configured Cloud KMS key.
      
       KMS key name format:
      
           "projects/[PROJECT_ID]/locations/[LOCATION]/keyRings/[KEYRING]/cryptoKeys/[KEY]"
      
       For example:
      
         `"projects/my-project/locations/us-central1/keyRings/my-ring/cryptoKeys/my-key"`
      
      
      
       To enable CMEK for the Log Router, set this field to a valid
       `kms_key_name` for which the associated service account has the required
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` role assigned for the key.
      
       The Cloud KMS key used by the Log Router can be updated by changing the
       `kms_key_name` to a new valid key name. Encryption operations that are in
       progress will be completed with the key that was in use when they started.
       Decryption operations will be completed using the key that was used at the
       time of encryption unless access to that key has been revoked.
      
       To disable CMEK for the Log Router, set this field to an empty string.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_key_name = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for kmsKeyName to set.
      Returns:
      This builder for chaining.
    • getKmsServiceAccountId

      public String getKmsServiceAccountId()
       Output only. The service account that will be used by the Log Router to
       access your Cloud KMS key.
      
       Before enabling CMEK for Log Router, you must first assign the role
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
       the Log Router will use to access your Cloud KMS key. Use
       [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to
       obtain the service account ID.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getKmsServiceAccountId in interface SettingsOrBuilder
      Returns:
      The kmsServiceAccountId.
    • getKmsServiceAccountIdBytes

      public com.google.protobuf.ByteString getKmsServiceAccountIdBytes()
       Output only. The service account that will be used by the Log Router to
       access your Cloud KMS key.
      
       Before enabling CMEK for Log Router, you must first assign the role
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
       the Log Router will use to access your Cloud KMS key. Use
       [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to
       obtain the service account ID.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getKmsServiceAccountIdBytes in interface SettingsOrBuilder
      Returns:
      The bytes for kmsServiceAccountId.
    • setKmsServiceAccountId

      public Settings.Builder setKmsServiceAccountId(String value)
       Output only. The service account that will be used by the Log Router to
       access your Cloud KMS key.
      
       Before enabling CMEK for Log Router, you must first assign the role
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
       the Log Router will use to access your Cloud KMS key. Use
       [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to
       obtain the service account ID.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The kmsServiceAccountId to set.
      Returns:
      This builder for chaining.
    • clearKmsServiceAccountId

      public Settings.Builder clearKmsServiceAccountId()
       Output only. The service account that will be used by the Log Router to
       access your Cloud KMS key.
      
       Before enabling CMEK for Log Router, you must first assign the role
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
       the Log Router will use to access your Cloud KMS key. Use
       [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to
       obtain the service account ID.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • setKmsServiceAccountIdBytes

      public Settings.Builder setKmsServiceAccountIdBytes(com.google.protobuf.ByteString value)
       Output only. The service account that will be used by the Log Router to
       access your Cloud KMS key.
      
       Before enabling CMEK for Log Router, you must first assign the role
       `roles/cloudkms.cryptoKeyEncrypterDecrypter` to the service account that
       the Log Router will use to access your Cloud KMS key. Use
       [GetSettings][google.logging.v2.ConfigServiceV2.GetSettings] to
       obtain the service account ID.
      
       See [Enabling CMEK for Log
       Router](https://cloud.google.com/logging/docs/routing/managed-encryption)
       for more information.
       
      string kms_service_account_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The bytes for kmsServiceAccountId to set.
      Returns:
      This builder for chaining.
    • getStorageLocation

      public String getStorageLocation()
       Optional. The Cloud region that will be used for _Default and _Required log
       buckets for newly created projects and folders. For example `europe-west1`.
       This setting does not affect the location of custom log buckets.
       
      string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStorageLocation in interface SettingsOrBuilder
      Returns:
      The storageLocation.
    • getStorageLocationBytes

      public com.google.protobuf.ByteString getStorageLocationBytes()
       Optional. The Cloud region that will be used for _Default and _Required log
       buckets for newly created projects and folders. For example `europe-west1`.
       This setting does not affect the location of custom log buckets.
       
      string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getStorageLocationBytes in interface SettingsOrBuilder
      Returns:
      The bytes for storageLocation.
    • setStorageLocation

      public Settings.Builder setStorageLocation(String value)
       Optional. The Cloud region that will be used for _Default and _Required log
       buckets for newly created projects and folders. For example `europe-west1`.
       This setting does not affect the location of custom log buckets.
       
      string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The storageLocation to set.
      Returns:
      This builder for chaining.
    • clearStorageLocation

      public Settings.Builder clearStorageLocation()
       Optional. The Cloud region that will be used for _Default and _Required log
       buckets for newly created projects and folders. For example `europe-west1`.
       This setting does not affect the location of custom log buckets.
       
      string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setStorageLocationBytes

      public Settings.Builder setStorageLocationBytes(com.google.protobuf.ByteString value)
       Optional. The Cloud region that will be used for _Default and _Required log
       buckets for newly created projects and folders. For example `europe-west1`.
       This setting does not affect the location of custom log buckets.
       
      string storage_location = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for storageLocation to set.
      Returns:
      This builder for chaining.
    • getDisableDefaultSink

      public boolean getDisableDefaultSink()
       Optional. If set to true, the _Default sink in newly created projects and
       folders will created in a disabled state. This can be used to automatically
       disable log ingestion if there is already an aggregated sink configured in
       the hierarchy. The _Default sink can be re-enabled manually if needed.
       
      bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDisableDefaultSink in interface SettingsOrBuilder
      Returns:
      The disableDefaultSink.
    • setDisableDefaultSink

      public Settings.Builder setDisableDefaultSink(boolean value)
       Optional. If set to true, the _Default sink in newly created projects and
       folders will created in a disabled state. This can be used to automatically
       disable log ingestion if there is already an aggregated sink configured in
       the hierarchy. The _Default sink can be re-enabled manually if needed.
       
      bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The disableDefaultSink to set.
      Returns:
      This builder for chaining.
    • clearDisableDefaultSink

      public Settings.Builder clearDisableDefaultSink()
       Optional. If set to true, the _Default sink in newly created projects and
       folders will created in a disabled state. This can be used to automatically
       disable log ingestion if there is already an aggregated sink configured in
       the hierarchy. The _Default sink can be re-enabled manually if needed.
       
      bool disable_default_sink = 5 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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