public static final class CreateAlertPolicyRequest.Builder extends GeneratedMessageV3.Builder<CreateAlertPolicyRequest.Builder> implements CreateAlertPolicyRequestOrBuilder
The protocol for the CreateAlertPolicy
request.
Protobuf type google.monitoring.v3.CreateAlertPolicyRequest
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public CreateAlertPolicyRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public CreateAlertPolicyRequest build()
Returns
buildPartial()
public CreateAlertPolicyRequest buildPartial()
Returns
clear()
public CreateAlertPolicyRequest.Builder clear()
Returns
Overrides
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];
Returns
clearField(Descriptors.FieldDescriptor field)
public CreateAlertPolicyRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearName()
public CreateAlertPolicyRequest.Builder clearName()
Required. The project 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
clearOneof(Descriptors.OneofDescriptor oneof)
public CreateAlertPolicyRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clone()
public CreateAlertPolicyRequest.Builder clone()
Returns
Overrides
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];
Returns
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];
Returns
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];
Returns
getDefaultInstanceForType()
public CreateAlertPolicyRequest getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getName()
Required. The project 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
Type | Description |
String | The name.
|
getNameBytes()
public ByteString getNameBytes()
Required. The project 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
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];
Returns
Type | Description |
boolean | Whether the alertPolicy field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeAlertPolicy(AlertPolicy value)
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];
Parameter
Returns
mergeFrom(CreateAlertPolicyRequest other)
public CreateAlertPolicyRequest.Builder mergeFrom(CreateAlertPolicyRequest other)
Parameter
Returns
public CreateAlertPolicyRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public CreateAlertPolicyRequest.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final CreateAlertPolicyRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
setAlertPolicy(AlertPolicy value)
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];
Parameter
Returns
setAlertPolicy(AlertPolicy.Builder builderForValue)
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];
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public CreateAlertPolicyRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setName(String value)
public CreateAlertPolicyRequest.Builder setName(String value)
Required. The project 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) = { ... }
Parameter
Name | Description |
value | String
The name to set.
|
Returns
setNameBytes(ByteString value)
public CreateAlertPolicyRequest.Builder setNameBytes(ByteString value)
Required. The project 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) = { ... }
Parameter
Name | Description |
value | ByteString
The bytes for name to set.
|
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public CreateAlertPolicyRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final CreateAlertPolicyRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides