Class StyleGuide.Builder (0.4.0)

public static final class StyleGuide.Builder extends GeneratedMessageV3.Builder<StyleGuide.Builder> implements StyleGuideOrBuilder

Represents a singleton style guide resource to be used for linting Open API specs.

Protobuf type google.cloud.apihub.v1.StyleGuide

Implements

StyleGuideOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StyleGuide.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StyleGuide.Builder
Overrides

build()

public StyleGuide build()
Returns
Type Description
StyleGuide

buildPartial()

public StyleGuide buildPartial()
Returns
Type Description
StyleGuide

clear()

public StyleGuide.Builder clear()
Returns
Type Description
StyleGuide.Builder
Overrides

clearContents()

public StyleGuide.Builder clearContents()

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
StyleGuide.Builder

clearField(Descriptors.FieldDescriptor field)

public StyleGuide.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
StyleGuide.Builder
Overrides

clearLinter()

public StyleGuide.Builder clearLinter()

Required. Target linter for the style guide.

.google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
StyleGuide.Builder

This builder for chaining.

clearName()

public StyleGuide.Builder clearName()

Identifier. The name of the style guide.

Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
StyleGuide.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public StyleGuide.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
StyleGuide.Builder
Overrides

clone()

public StyleGuide.Builder clone()
Returns
Type Description
StyleGuide.Builder
Overrides

getContents()

public StyleGuideContents getContents()

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
StyleGuideContents

The contents.

getContentsBuilder()

public StyleGuideContents.Builder getContentsBuilder()

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
StyleGuideContents.Builder

getContentsOrBuilder()

public StyleGuideContentsOrBuilder getContentsOrBuilder()

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
StyleGuideContentsOrBuilder

getDefaultInstanceForType()

public StyleGuide getDefaultInstanceForType()
Returns
Type Description
StyleGuide

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getLinter()

public Linter getLinter()

Required. Target linter for the style guide.

.google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Linter

The linter.

getLinterValue()

public int getLinterValue()

Required. Target linter for the style guide.

.google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for linter.

getName()

public String getName()

Identifier. The name of the style guide.

Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the style guide.

Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

hasContents()

public boolean hasContents()

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Returns
Type Description
boolean

Whether the contents field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeContents(StyleGuideContents value)

public StyleGuide.Builder mergeContents(StyleGuideContents value)

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value StyleGuideContents
Returns
Type Description
StyleGuide.Builder

mergeFrom(StyleGuide other)

public StyleGuide.Builder mergeFrom(StyleGuide other)
Parameter
Name Description
other StyleGuide
Returns
Type Description
StyleGuide.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public StyleGuide.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
StyleGuide.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public StyleGuide.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
StyleGuide.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StyleGuide.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StyleGuide.Builder
Overrides

setContents(StyleGuideContents value)

public StyleGuide.Builder setContents(StyleGuideContents value)

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
value StyleGuideContents
Returns
Type Description
StyleGuide.Builder

setContents(StyleGuideContents.Builder builderForValue)

public StyleGuide.Builder setContents(StyleGuideContents.Builder builderForValue)

Required. Input only. The contents of the uploaded style guide.

.google.cloud.apihub.v1.StyleGuideContents contents = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.field_behavior) = INPUT_ONLY];

Parameter
Name Description
builderForValue StyleGuideContents.Builder
Returns
Type Description
StyleGuide.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public StyleGuide.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
StyleGuide.Builder
Overrides

setLinter(Linter value)

public StyleGuide.Builder setLinter(Linter value)

Required. Target linter for the style guide.

.google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Linter

The linter to set.

Returns
Type Description
StyleGuide.Builder

This builder for chaining.

setLinterValue(int value)

public StyleGuide.Builder setLinterValue(int value)

Required. Target linter for the style guide.

.google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for linter to set.

Returns
Type Description
StyleGuide.Builder

This builder for chaining.

setName(String value)

public StyleGuide.Builder setName(String value)

Identifier. The name of the style guide.

Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
StyleGuide.Builder

This builder for chaining.

setNameBytes(ByteString value)

public StyleGuide.Builder setNameBytes(ByteString value)

Identifier. The name of the style guide.

Format: projects/{project}/locations/{location}/plugins/{plugin}/styleGuide

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
StyleGuide.Builder

This builder for chaining.

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

public StyleGuide.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
StyleGuide.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final StyleGuide.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
StyleGuide.Builder
Overrides