Class CreateAlertPolicyRequest.Builder

    • 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<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.GeneratedMessageV3.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
      • setRepeatedField

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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

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

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

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