Send feedback
  
   
 
  
    
      Class CreateFunctionRequest.Builder (2.4.3)
    
    
      
      
      Stay organized with collections
     
    
      
      Save and categorize content based on your preferences.
     
    
  
  
   
  
    
  
  
    
    
    
    
  Version 2.4.3keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   static   final   class  CreateFunctionRequest . Builder   extends   GeneratedMessageV3 . Builder<CreateFunctionRequest . Builder >  implements   CreateFunctionRequestOrBuilder  
   Request for the CreateFunction method.
 Protobuf type google.cloud.functions.v2beta.CreateFunctionRequest
Static Methods
   
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  Returns 
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   CreateFunctionRequest . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  build() 
  
    
public   CreateFunctionRequest   build ()  
  Returns 
  
  buildPartial() 
  
    
public   CreateFunctionRequest   buildPartial ()  
  Returns 
  
  clear() 
  
    
public   CreateFunctionRequest . Builder   clear ()  
  Returns 
  
  Overrides 
  
  clearField(Descriptors.FieldDescriptor field) 
  
    
public   CreateFunctionRequest . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  clearFunction() 
  
    
public   CreateFunctionRequest . Builder   clearFunction ()  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  clearFunctionId() 
  
    
public   CreateFunctionRequest . Builder   clearFunctionId ()  
   The ID to use for the function, which will become the final component of
 the function's resource name.
 This value should be 4-63 characters, and valid characters
 are /a-z -/.
 string function_id = 3;
Returns 
  
  clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   CreateFunctionRequest . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  clearParent() 
  
    
public   CreateFunctionRequest . Builder   clearParent ()  
   Required. The project and location in which the function should be created, specified
 in the format projects/*/locations/*
 
 string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
 
Returns 
  
  clone() 
  
    
public   CreateFunctionRequest . Builder   clone ()  
  Returns 
  
  Overrides 
  
  getDefaultInstanceForType() 
  
    
public   CreateFunctionRequest   getDefaultInstanceForType ()  
  Returns 
  
  getDescriptorForType() 
  
    
public   Descriptors . Descriptor   getDescriptorForType ()  
  Returns 
  
  Overrides 
  
  getFunction() 
  
    
public   Function   getFunction ()  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  getFunctionBuilder() 
  
    
public   Function . Builder   getFunctionBuilder ()  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  getFunctionId() 
  
    
public   String   getFunctionId ()  
   The ID to use for the function, which will become the final component of
 the function's resource name.
 This value should be 4-63 characters, and valid characters
 are /a-z -/.
 string function_id = 3;
Returns 
  
    
      
        Type Description  
      
        String The functionId.
 
     
  
  getFunctionIdBytes() 
  
    
public   ByteString   getFunctionIdBytes ()  
   The ID to use for the function, which will become the final component of
 the function's resource name.
 This value should be 4-63 characters, and valid characters
 are /a-z -/.
 string function_id = 3;
Returns 
  
    
      
        Type Description  
      
        ByteString The bytes for functionId.
 
     
  
  getFunctionOrBuilder() 
  
    
public   FunctionOrBuilder   getFunctionOrBuilder ()  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
  getParent() 
  
    
public   String   getParent ()  
   Required. The project and location in which the function should be created, specified
 in the format projects/*/locations/*
 
 string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
 
Returns 
  
    
      
        Type Description  
      
        String The parent.
 
     
  
  getParentBytes() 
  
    
public   ByteString   getParentBytes ()  
   Required. The project and location in which the function should be created, specified
 in the format projects/*/locations/*
 
 string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
 
Returns 
  
  hasFunction() 
  
    
public   boolean   hasFunction ()  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Returns 
  
    
      
        Type Description  
      
        boolean Whether the function field is set.
 
     
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  Returns 
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  Returns 
  
  Overrides 
  
  mergeFrom(CreateFunctionRequest other) 
  
    
public   CreateFunctionRequest . Builder   mergeFrom ( CreateFunctionRequest   other )  
  Parameter 
  
  Returns 
  
  
    
public   CreateFunctionRequest . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  Exceptions 
  
  mergeFrom(Message other) 
  
    
public   CreateFunctionRequest . Builder   mergeFrom ( Message   other )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  mergeFunction(Function value) 
  
    
public   CreateFunctionRequest . Builder   mergeFunction ( Function   value )  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   CreateFunctionRequest . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  Parameter 
  
  Returns 
  
  Overrides 
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   CreateFunctionRequest . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  setFunction(Function value) 
  
    
public   CreateFunctionRequest . Builder   setFunction ( Function   value )  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  setFunction(Function.Builder builderForValue) 
  
    
public   CreateFunctionRequest . Builder   setFunction ( Function . Builder   builderForValue )  
   Required. Function to be created.
 
 .google.cloud.functions.v2beta.Function function = 2 [(.google.api.field_behavior) = REQUIRED];
 
Parameter 
  
  Returns 
  
  setFunctionId(String value) 
  
    
public   CreateFunctionRequest . Builder   setFunctionId ( String   value )  
   The ID to use for the function, which will become the final component of
 the function's resource name.
 This value should be 4-63 characters, and valid characters
 are /a-z -/.
 string function_id = 3;
Parameter 
  
    
      
        Name Description  
      
        value String The functionId to set.
 
     
  
  Returns 
  
  setFunctionIdBytes(ByteString value) 
  
    
public   CreateFunctionRequest . Builder   setFunctionIdBytes ( ByteString   value )  
   The ID to use for the function, which will become the final component of
 the function's resource name.
 This value should be 4-63 characters, and valid characters
 are /a-z -/.
 string function_id = 3;
Parameter 
  
    
      
        Name Description  
      
        value ByteString The bytes for functionId to set.
 
     
  
  Returns 
  
  setParent(String value) 
  
    
public   CreateFunctionRequest . Builder   setParent ( String   value )  
   Required. The project and location in which the function should be created, specified
 in the format projects/*/locations/*
 
 string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
 
Parameter 
  
    
      
        Name Description  
      
        value String The parent to set.
 
     
  
  Returns 
  
  setParentBytes(ByteString value) 
  
    
public   CreateFunctionRequest . Builder   setParentBytes ( ByteString   value )  
   Required. The project and location in which the function should be created, specified
 in the format projects/*/locations/*
 
 string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
 
Parameter 
  
    
      
        Name Description  
      
        value ByteString The bytes for parent to set.
 
     
  
  Returns 
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   CreateFunctionRequest . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  Parameters 
  
  Returns 
  
  Overrides 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   CreateFunctionRequest . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  Parameter 
  
  Returns 
  
  Overrides 
  
 
     
    
  
  
  
     
  
    
    
      
    
     
  
       
         
  
  
    
    Send feedback
  
   
 
       
    
    
  
  
 
  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-29 UTC.
 
 
  
  
    
    
    
      
  
  
    Need to tell us more?
  
   
 
     
  
  
    
      [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-29 UTC."],[],[]]