Class SpecContents.Builder (0.29.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 0.29.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  SpecContents . Builder   extends   GeneratedMessageV3 . Builder<SpecContents . Builder >  implements   SpecContentsOrBuilder  
   The spec contents.
 Protobuf type google.cloud.apihub.v1.SpecContents
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder() 
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int) 
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int) 
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString) 
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int) 
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int) 
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder) 
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Methods
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   SpecContents . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  build() 
  
    
public   SpecContents   build ()  
  
  buildPartial() 
  
    
public   SpecContents   buildPartial ()  
  
  clear() 
  
    
public   SpecContents . Builder   clear ()  
  
  Overrides 
  
  clearContents() 
  
    
public   SpecContents . Builder   clearContents ()  
   Required. The contents of the spec.
 bytes contents = 1 [(.google.api.field_behavior) = REQUIRED];
clearField(Descriptors.FieldDescriptor field) 
  
    
public   SpecContents . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  
  
  Overrides 
  
  clearMimeType() 
  
    
public   SpecContents . Builder   clearMimeType ()  
   Required. The mime type of the content for example application/json,
 application/yaml, application/wsdl etc.
 string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   SpecContents . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  
  
  Overrides 
  
  clone() 
  
    
public   SpecContents . Builder   clone ()  
  
  Overrides 
  
  getContents() 
  
    
public   ByteString   getContents ()  
   Required. The contents of the spec.
 bytes contents = 1 [(.google.api.field_behavior) = REQUIRED];
getDefaultInstanceForType() 
  
    
public   SpecContents   getDefaultInstanceForType ()  
  
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  
  Overrides 
  
  getMimeType() 
  
    
public   String   getMimeType ()  
   Required. The mime type of the content for example application/json,
 application/yaml, application/wsdl etc.
 string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
    
      
        Returns  
      
        Type Description  
      
        String The mimeType.
 
     
  
  getMimeTypeBytes() 
  
    
public   ByteString   getMimeTypeBytes ()  
   Required. The mime type of the content for example application/json,
 application/yaml, application/wsdl etc.
 string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for mimeType.
 
     
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  mergeFrom(SpecContents other) 
  
    
public   SpecContents . Builder   mergeFrom ( SpecContents   other )  
  
  
  mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) 
  
    
public   SpecContents . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  Overrides 
  
  
  mergeFrom(Message other) 
  
    
public   SpecContents . Builder   mergeFrom ( Message   other )  
  
    
      
        Parameter  
      
        Name Description  
      
        otherMessage  
     
  
  
  Overrides 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   SpecContents . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  Overrides 
  
  setContents(ByteString value) 
  
    
public   SpecContents . Builder   setContents ( ByteString   value )  
   Required. The contents of the spec.
 bytes contents = 1 [(.google.api.field_behavior) = REQUIRED];
    
      
        Parameter  
      
        Name Description  
      
        valueByteString The contents to set.
 
     
  
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   SpecContents . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  setMimeType(String value) 
  
    
public   SpecContents . Builder   setMimeType ( String   value )  
   Required. The mime type of the content for example application/json,
 application/yaml, application/wsdl etc.
 string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
    
      
        Parameter  
      
        Name Description  
      
        valueString The mimeType to set.
 
     
  
  
  setMimeTypeBytes(ByteString value) 
  
    
public   SpecContents . Builder   setMimeTypeBytes ( ByteString   value )  
   Required. The mime type of the content for example application/json,
 application/yaml, application/wsdl etc.
 string mime_type = 2 [(.google.api.field_behavior) = REQUIRED];
    
      
        Parameter  
      
        Name Description  
      
        valueByteString The bytes for mimeType to set.
 
     
  
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   SpecContents . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  
  
  Overrides 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   SpecContents . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  Overrides 
  
 
     
    
  
  
  
     
  
    
    
      
       
    
    
  
  
 
  Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
  Last updated 2025-10-28 UTC.
 
 
  
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-28 UTC."],[],[]]