Class StyleGuide.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<StyleGuide.Builder>
com.google.cloud.apihub.v1.StyleGuide.Builder
All Implemented Interfaces:
StyleGuideOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
StyleGuide

public static final class StyleGuide.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<StyleGuide.Builder>
    • clear

      public StyleGuide.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<StyleGuide.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.GeneratedMessage.Builder<StyleGuide.Builder>
    • getDefaultInstanceForType

      public StyleGuide getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public StyleGuide build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public StyleGuide buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public StyleGuide.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<StyleGuide.Builder>
    • mergeFrom

      public StyleGuide.Builder mergeFrom(StyleGuide other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<StyleGuide.Builder>
    • mergeFrom

      public StyleGuide.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<StyleGuide.Builder>
      Throws:
      IOException
    • 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];
      Specified by:
      getName in interface StyleGuideOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.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];
      Specified by:
      getNameBytes in interface StyleGuideOrBuilder
      Returns:
      The bytes for name.
    • setName

      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];
      Parameters:
      value - The name to set.
      Returns:
      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:
      This builder for chaining.
    • setNameBytes

      public StyleGuide.Builder setNameBytes(com.google.protobuf.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];
      Parameters:
      value - The bytes for name to set.
      Returns:
      This builder for chaining.
    • getLinterValue

      public int getLinterValue()
       Required. Target linter for the style guide.
       
      .google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getLinterValue in interface StyleGuideOrBuilder
      Returns:
      The enum numeric value on the wire for linter.
    • setLinterValue

      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];
      Parameters:
      value - The enum numeric value on the wire for linter to set.
      Returns:
      This builder for chaining.
    • getLinter

      public Linter getLinter()
       Required. Target linter for the style guide.
       
      .google.cloud.apihub.v1.Linter linter = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getLinter in interface StyleGuideOrBuilder
      Returns:
      The linter.
    • setLinter

      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];
      Parameters:
      value - The linter to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • 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];
      Specified by:
      hasContents in interface StyleGuideOrBuilder
      Returns:
      Whether the contents field is set.
    • 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];
      Specified by:
      getContents in interface StyleGuideOrBuilder
      Returns:
      The contents.
    • setContents

      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];
    • setContents

      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];
    • mergeContents

      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];
    • 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];
    • 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];
    • 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];
      Specified by:
      getContentsOrBuilder in interface StyleGuideOrBuilder