public static final class CreateAlertPolicyRequest.Builder extends GeneratedMessage.Builder<CreateAlertPolicyRequest.Builder> implements CreateAlertPolicyRequestOrBuilder The protocol for the CreateAlertPolicy request.
Protobuf type google.monitoring.v3.CreateAlertPolicyRequest
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > CreateAlertPolicyRequest.BuilderImplements
CreateAlertPolicyRequestOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
build()
public CreateAlertPolicyRequest build()| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest |
|
buildPartial()
public CreateAlertPolicyRequest buildPartial()| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest |
|
clear()
public CreateAlertPolicyRequest.Builder clear()| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
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 | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
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 | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
This builder for chaining. |
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 | |
|---|---|
| Type | Description |
AlertPolicy |
The alertPolicy. |
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 | |
|---|---|
| Type | Description |
AlertPolicy.Builder |
|
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 | |
|---|---|
| Type | Description |
AlertPolicyOrBuilder |
|
getDefaultInstanceForType()
public CreateAlertPolicyRequest getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getName()
public String 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 | |
|---|---|
| Type | Description |
ByteString |
The bytes for name. |
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 GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
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 | |
|---|---|
| Name | Description |
value |
AlertPolicy |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
mergeFrom(CreateAlertPolicyRequest other)
public CreateAlertPolicyRequest.Builder mergeFrom(CreateAlertPolicyRequest other)| Parameter | |
|---|---|
| Name | Description |
other |
CreateAlertPolicyRequest |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public CreateAlertPolicyRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public CreateAlertPolicyRequest.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
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 | |
|---|---|
| Name | Description |
value |
AlertPolicy |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
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 | |
|---|---|
| Name | Description |
builderForValue |
AlertPolicy.Builder |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
|
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 |
StringThe name to set. |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
This builder for chaining. |
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 |
ByteStringThe bytes for name to set. |
| Returns | |
|---|---|
| Type | Description |
CreateAlertPolicyRequest.Builder |
This builder for chaining. |