Class CreateSnoozeRequest.Builder (3.37.0)

public static final class CreateSnoozeRequest.Builder extends GeneratedMessageV3.Builder<CreateSnoozeRequest.Builder> implements CreateSnoozeRequestOrBuilder

The message definition for creating a Snooze. Users must provide the body of the Snooze to be created but must omit the Snooze field, name.

Protobuf type google.monitoring.v3.CreateSnoozeRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public CreateSnoozeRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

build()

public CreateSnoozeRequest build()
Returns
TypeDescription
CreateSnoozeRequest

buildPartial()

public CreateSnoozeRequest buildPartial()
Returns
TypeDescription
CreateSnoozeRequest

clear()

public CreateSnoozeRequest.Builder clear()
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public CreateSnoozeRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public CreateSnoozeRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

clearParent()

public CreateSnoozeRequest.Builder clearParent()

Required. The project in which a Snooze should be created. The format is:

 projects/[PROJECT_ID_OR_NUMBER]

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
CreateSnoozeRequest.Builder

This builder for chaining.

clearSnooze()

public CreateSnoozeRequest.Builder clearSnooze()

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
CreateSnoozeRequest.Builder

clone()

public CreateSnoozeRequest.Builder clone()
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

getDefaultInstanceForType()

public CreateSnoozeRequest getDefaultInstanceForType()
Returns
TypeDescription
CreateSnoozeRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getParent()

public String getParent()

Required. The project in which a Snooze should be created. The format is:

 projects/[PROJECT_ID_OR_NUMBER]

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The project in which a Snooze should be created. The format is:

 projects/[PROJECT_ID_OR_NUMBER]

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
TypeDescription
ByteString

The bytes for parent.

getSnooze()

public Snooze getSnooze()

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Snooze

The snooze.

getSnoozeBuilder()

public Snooze.Builder getSnoozeBuilder()

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Snooze.Builder

getSnoozeOrBuilder()

public SnoozeOrBuilder getSnoozeOrBuilder()

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
SnoozeOrBuilder

hasSnooze()

public boolean hasSnooze()

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the snooze field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CreateSnoozeRequest other)

public CreateSnoozeRequest.Builder mergeFrom(CreateSnoozeRequest other)
Parameter
NameDescription
otherCreateSnoozeRequest
Returns
TypeDescription
CreateSnoozeRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public CreateSnoozeRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public CreateSnoozeRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

mergeSnooze(Snooze value)

public CreateSnoozeRequest.Builder mergeSnooze(Snooze value)

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueSnooze
Returns
TypeDescription
CreateSnoozeRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final CreateSnoozeRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public CreateSnoozeRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

setParent(String value)

public CreateSnoozeRequest.Builder setParent(String value)

Required. The project in which a Snooze should be created. The format is:

 projects/[PROJECT_ID_OR_NUMBER]

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueString

The parent to set.

Returns
TypeDescription
CreateSnoozeRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public CreateSnoozeRequest.Builder setParentBytes(ByteString value)

Required. The project in which a Snooze should be created. The format is:

 projects/[PROJECT_ID_OR_NUMBER]

string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
CreateSnoozeRequest.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public CreateSnoozeRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides

setSnooze(Snooze value)

public CreateSnoozeRequest.Builder setSnooze(Snooze value)

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueSnooze
Returns
TypeDescription
CreateSnoozeRequest.Builder

setSnooze(Snooze.Builder builderForValue)

public CreateSnoozeRequest.Builder setSnooze(Snooze.Builder builderForValue)

Required. The Snooze to create. Omit the name field, as it will be filled in by the API.

.google.monitoring.v3.Snooze snooze = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueSnooze.Builder
Returns
TypeDescription
CreateSnoozeRequest.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final CreateSnoozeRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
CreateSnoozeRequest.Builder
Overrides