Class CreateAlertPolicyRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<CreateAlertPolicyRequest.Builder>
com.google.monitoring.v3.CreateAlertPolicyRequest.Builder
All Implemented Interfaces:
CreateAlertPolicyRequestOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
CreateAlertPolicyRequest

public static final class CreateAlertPolicyRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<CreateAlertPolicyRequest.Builder> implements CreateAlertPolicyRequestOrBuilder
 The protocol for the `CreateAlertPolicy` request.
 
Protobuf type google.monitoring.v3.CreateAlertPolicyRequest
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<CreateAlertPolicyRequest.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<CreateAlertPolicyRequest.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<CreateAlertPolicyRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

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

      public String getName()
       Required. The
       [project](https://cloud.google.com/monitoring/api/v3#project_name) in which
       to create the alerting policy. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]
      
       Note that this field names the parent container in which the alerting
       policy will be written, not the name of the created policy. |name| must be
       a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will
       return. The alerting policy that is returned will have a name that contains
       a normalized representation of this name as a prefix but adds a suffix of
       the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
       container.
       
      string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getName in interface CreateAlertPolicyRequestOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Required. The
       [project](https://cloud.google.com/monitoring/api/v3#project_name) in which
       to create the alerting policy. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]
      
       Note that this field names the parent container in which the alerting
       policy will be written, not the name of the created policy. |name| must be
       a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will
       return. The alerting policy that is returned will have a name that contains
       a normalized representation of this name as a prefix but adds a suffix of
       the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
       container.
       
      string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Specified by:
      getNameBytes in interface CreateAlertPolicyRequestOrBuilder
      Returns:
      The bytes for name.
    • setName

      public CreateAlertPolicyRequest.Builder setName(String value)
       Required. The
       [project](https://cloud.google.com/monitoring/api/v3#project_name) in which
       to create the alerting policy. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]
      
       Note that this field names the parent container in which the alerting
       policy will be written, not the name of the created policy. |name| must be
       a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will
       return. The alerting policy that is returned will have a name that contains
       a normalized representation of this name as a prefix but adds a suffix of
       the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
       container.
       
      string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The name to set.
      Returns:
      This builder for chaining.
    • clearName

       Required. The
       [project](https://cloud.google.com/monitoring/api/v3#project_name) in which
       to create the alerting policy. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]
      
       Note that this field names the parent container in which the alerting
       policy will be written, not the name of the created policy. |name| must be
       a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will
       return. The alerting policy that is returned will have a name that contains
       a normalized representation of this name as a prefix but adds a suffix of
       the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
       container.
       
      string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Returns:
      This builder for chaining.
    • setNameBytes

      public CreateAlertPolicyRequest.Builder setNameBytes(com.google.protobuf.ByteString value)
       Required. The
       [project](https://cloud.google.com/monitoring/api/v3#project_name) in which
       to create the alerting policy. The format is:
      
       projects/[PROJECT_ID_OR_NUMBER]
      
       Note that this field names the parent container in which the alerting
       policy will be written, not the name of the created policy. |name| must be
       a host project of a Metrics Scope, otherwise INVALID_ARGUMENT error will
       return. The alerting policy that is returned will have a name that contains
       a normalized representation of this name as a prefix but adds a suffix of
       the form `/alertPolicies/[ALERT_POLICY_ID]`, identifying the policy in the
       container.
       
      string name = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • hasAlertPolicy

      public boolean hasAlertPolicy()
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasAlertPolicy in interface CreateAlertPolicyRequestOrBuilder
      Returns:
      Whether the alertPolicy field is set.
    • getAlertPolicy

      public AlertPolicy getAlertPolicy()
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAlertPolicy in interface CreateAlertPolicyRequestOrBuilder
      Returns:
      The alertPolicy.
    • setAlertPolicy

      public CreateAlertPolicyRequest.Builder setAlertPolicy(AlertPolicy value)
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
    • setAlertPolicy

      public CreateAlertPolicyRequest.Builder setAlertPolicy(AlertPolicy.Builder builderForValue)
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeAlertPolicy

      public CreateAlertPolicyRequest.Builder mergeAlertPolicy(AlertPolicy value)
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearAlertPolicy

      public CreateAlertPolicyRequest.Builder clearAlertPolicy()
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
    • getAlertPolicyBuilder

      public AlertPolicy.Builder getAlertPolicyBuilder()
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
    • getAlertPolicyOrBuilder

      public AlertPolicyOrBuilder getAlertPolicyOrBuilder()
       Required. The requested alerting policy. You should omit the `name` field
       in this policy. The name will be returned in the new policy, including a
       new `[ALERT_POLICY_ID]` value.
       
      .google.monitoring.v3.AlertPolicy alert_policy = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getAlertPolicyOrBuilder in interface CreateAlertPolicyRequestOrBuilder