Last active
May 24, 2018 21:17
-
-
Save beccasaurus/cbc97bcb6c14edf7ca20fd2fbc084a03 to your computer and use it in GitHub Desktop.
@SampleFile [Node.js]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// @sampleFile | |
DynamicLangSampleView { | |
templateFileName = nodejs/standalone_sample.snip, | |
outputPath = src/samples/v1/create_book_sample_request_create_a_book.js, | |
className = CreateBookSampleRequestCreateABook, | |
gapicPackageName = gapic-google-cloud-library-v1 | |
// The following object is available in snips as @apiMethod | |
// @apiMethod = @sampleFile.libraryMethod | |
libraryMethod = OptionalArrayMethodView { | |
type = OptionalArrayMethod | |
// .proto service is LibraryService | |
// API only has 1 service, LibraryService | |
apiVersion = v1 | |
apiModuleName = library | |
localPackageName = library | |
apiClassName = LibraryServiceClient | |
apiVariableName = libraryServiceClient | |
stubName = libraryServiceStub | |
packageServiceName = library | |
packageName = @google-cloud/library | |
// This @sampleFile is for a sample of the CreateBook method | |
name = createBook | |
key = createBook | |
grpcMethodName = CreateBook | |
grpcStreamingType = NonStreaming | |
rerouteToGrpcInterface = null | |
fullyQualifiedApiClassName = $ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $ | |
requestVariableName = $ NOT IMPLEMENTED: SurfaceNamer.getRequestVariableName $ | |
requestTypeName = $ NOT IMPLEMENTED: SurfaceNamer.getAndSaveTypeName $ | |
responseTypeName = $ NOT IMPLEMENTED: SurfaceNamer.getAndSaveTypeName $ | |
topLevelAliasedApiClassName = $ NOT IMPLEMENTED: SurfaceNamer.getTopLevelAliasedApiClassName $ | |
versionAliasedApiClassName = $ NOT IMPLEMENTED: SurfaceNamer.getVersionAliasedApiClassName $ | |
// From `header_request_params` from library gapic yaml | |
headerRequestParams = [ | |
HeaderRequestParamView { | |
fullyQualifiedName = name | |
gettersChain = [ name ] | |
} | |
HeaderRequestParamView { | |
fullyQualifiedName = book.read | |
gettersChain = [ book, read ] | |
} | |
] | |
// Lines of code! Lots of .snip methods are used to build this up, I haven't walked through it yet | |
samples = [ | |
MethodSampleView { | |
// This is a representation of the `sample_value_sets` config for this sample | |
valueSet = SampleValueSetView { | |
id = create_a_book, | |
title = Create a book, | |
description = "Testing calling forms: {Java:[Flattened, Request, Callable]}", | |
parameters = [ | |
name = " bookShelves/[Your Shelf Name] " | |
book.name = " [Your Book Identifier] " | |
book.author = " Lewis Carroll " | |
book.title = " Alices Adventures in Wonderland " | |
] | |
} | |
callingForm=Request, | |
// INIT CODE | |
initCode = InitCodeView { | |
lines = [ | |
SimpleInitCodeLineView { | |
lineType=SimpleInitLine, | |
typeName=string, | |
identifier=formattedName, | |
doc=[], | |
needsLeadingNewline=false, | |
initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, | |
fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $ | |
formatFunctionName=shelfPath, | |
formatSpec=shelves/%s, | |
formatArgs=['[SHELF_ID]'] | |
} | |
} | |
SimpleInitCodeLineView { | |
lineType=SimpleInitLine | |
typeName=string | |
identifier=name2 | |
doc=[] | |
needsLeadingNewline=true | |
initValue=SimpleInitValueView { | |
initialValue = '[Your Book Identifier]', isRepeated=null | |
} | |
} | |
SimpleInitCodeLineView { | |
lineType=SimpleInitLine, | |
typeName=string, | |
identifier=author, | |
doc=[], | |
needsLeadingNewline=true, | |
initValue=SimpleInitValueView{initialValue='Lewis Carroll', isRepeated=null} | |
} | |
SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], | |
needsLeadingNewline=true, | |
initValue=SimpleInitValueView{initialValue='Alices Adventures in Wonderland', isRepeated=null} | |
} | |
StructureInitCodeLineView { | |
lineType=StructureInitLine, | |
typeName=library.v1.types.Book, | |
fullyQualifiedTypeName=google.example.library.v1.Book, | |
typeConstructor=library.v1.types.Book, | |
identifier=book, | |
fieldSettings = [ | |
FieldSettingView { | |
fieldSetFunction=setName, | |
fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, | |
fieldGetFunction=getName, | |
identifier=name2, | |
initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, | |
typeName=string, | |
identifier=name2, | |
doc=[], | |
needsLeadingNewline=false, | |
initValue=SimpleInitValueView{initialValue='[Your Book Identifier]', isRepeated=null} | |
}, | |
fieldName=name, | |
isMap=false, | |
isArray=false, | |
oneofConfig=null, | |
elementTypeName=string, | |
required=true, | |
formatMethodName=, | |
transformParamFunctionName= | |
}, | |
FieldSettingView{ | |
fieldSetFunction=setAuthor, | |
fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, | |
fieldGetFunction=getAuthor, | |
identifier=author, | |
initCodeLine=SimpleInitCodeLineView{ | |
lineType=SimpleInitLine, | |
typeName=string, | |
identifier=author, | |
doc=[], | |
needsLeadingNewline=true, | |
initValue=SimpleInitValueView{ | |
initialValue='Lewis Carroll', isRepeated=null | |
} | |
}, | |
fieldName=author, | |
isMap=false, | |
isArray=false, | |
oneofConfig=null, | |
elementTypeName=string, | |
required=false, | |
formatMethodName=, | |
transformParamFunctionName=}, | |
FieldSettingView{ | |
fieldSetFunction=setTitle, | |
fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, | |
fieldGetFunction=getTitle, | |
identifier=title, | |
initCodeLine=SimpleInitCodeLineView{ | |
lineType=SimpleInitLine, | |
typeName=string, | |
identifier=title, | |
doc=[], | |
needsLeadingNewline=true, | |
initValue=SimpleInitValueView{ | |
initialValue='Alices Adventures in Wonderland', isRepeated=null | |
} | |
}, | |
fieldName=title, | |
isMap=false, | |
isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}], topLevelLines=[SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}], fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=formattedName, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setBook, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getBook, identifier=book, initCodeLine=StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}, fieldName=book, isMap=false, isArray=false, oneofConfig=null, elementTypeName=google.example.library.v1.Book, required=true, formatMethodName=, transformParamFunctionName=}], optionalFieldSettings=[], requiredFieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=formattedName, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setBook, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getBook, identifier=book, initCodeLine=StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}, fieldName=book, isMap=false, isArray=false, oneofConfig=null, elementTypeName=google.example.library.v1.Book, required=true, formatMethodName=, transformParamFunctionName=}], importSection=ImportSectionView { | |
standardImports=[], externalImports=[], appImports=[ImportFileView { | |
moduleName=, types=[ImportTypeView { | |
fullName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, nickname=getFullyQualifiedApiWrapperClassName $, type=SimpleImport}]}, ImportFileView { | |
moduleName=, types=[ImportTypeView { | |
fullName=google.example.library.v1.Book, nickname=library.v1.types.Book, type=SimpleImport}]}], serviceImports=[]}, apiFileName=library_service_client.js, versionIndexFileImportName=$ NOT IMPLEMENTED: SurfaceNamer.getVersionIndexFileImportName $, topLevelIndexFileImportName=$ NOT IMPLEMENTED: SurfaceNamer.getTopLevelIndexFileImportName $}}] | |
// Parameters defined in `parameters` in this samples's config from `sample_value_sets` in library gapic yaml | |
methodParams = [ | |
DynamicLangDefaultableParamView { name = name, defaultValue = } | |
DynamicLangDefaultableParamView { name = book, defaultValue = } | |
DynamicLangDefaultableParamView { name = options, defaultValue = null0 } | |
] | |
// rpc CreateBook(CreateBookRequest) returns (Book) { | |
// option (google.api.http) = { post: "/v1/{name=bookShelves/*}/books" body: "book" }; | |
// } | |
// require params, see: `required_fields` in library gapic yaml | |
requiredRequestObjectParams = [ | |
// Bookshelf Name (required) | |
RequestObjectParamView { | |
name=name, | |
keyName=name, | |
nameAsMethodName=name, | |
elementTypeName=string, | |
typeName=string, | |
setCallName=setName, | |
addCallName=setName, | |
getCallName=name, | |
transformParamFunctionName=null, | |
formatMethodName=null, | |
isMap=false, | |
isArray=false, | |
isPrimitive=true, | |
isOptional=false, | |
defaultValue=null, | |
optionalDefault=null, | |
fieldCopyMethods=[] | |
}, | |
// Book object to create (required) | |
RequestObjectParamView { | |
name=book, | |
keyName=book, | |
nameAsMethodName=book, | |
elementTypeName=library.v1.types.Book, | |
typeName=library.v1.types.Book, | |
setCallName=setBook, | |
addCallName=setBook, | |
getCallName=book, | |
transformParamFunctionName=null, | |
formatMethodName=null, | |
isMap=false, | |
isArray=false, | |
isPrimitive=false, | |
isOptional=false, | |
defaultValue=null, | |
optionalDefault=null, | |
fieldCopyMethods=[] | |
} | |
], | |
oneofParams = [] | |
optionalRequestObjectParams = [] | |
optionalRequestObjectParamsNoPageToken = [] | |
hasRequestParameters = true | |
hasRequiredParameters = true | |
hasReturnValue = true | |
longRunningView = null | |
pageStreamingView = null | |
isSingularRequestMethod = true | |
packageHasMultipleServices = false | |
// INIT CODE (how is this different from the initCode above in sampels?) | |
initCode = InitCodeView { | |
lines = [ | |
SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}], topLevelLines=[SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}], fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=formattedName, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setBook, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getBook, identifier=book, initCodeLine=StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}, fieldName=book, isMap=false, isArray=false, oneofConfig=null, elementTypeName=google.example.library.v1.Book, required=true, formatMethodName=, transformParamFunctionName=}], optionalFieldSettings=[], requiredFieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=formattedName, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=formattedName, doc=[], needsLeadingNewline=false, initValue=FormattedInitValueView { | |
apiWrapperName=LibraryServiceClient, fullyQualifiedApiWrapperName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, formatFunctionName=shelfPath, formatSpec=shelves/%s, formatArgs=['[SHELF_ID]']}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setBook, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getBook, identifier=book, initCodeLine=StructureInitCodeLineView { | |
lineType=StructureInitLine, typeName=library.v1.types.Book, fullyQualifiedTypeName=google.example.library.v1.Book, typeConstructor=library.v1.types.Book, identifier=book, fieldSettings=[FieldSettingView { | |
fieldSetFunction=setName, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getName, identifier=name2, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=name2, doc=[], needsLeadingNewline=false, initValue=SimpleInitValueView { | |
initialValue='[Your Book Identifier]', isRepeated=null}}, fieldName=name, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=true, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setAuthor, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getAuthor, identifier=author, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=author, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Lewis Carroll', isRepeated=null}}, fieldName=author, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}, FieldSettingView { | |
fieldSetFunction=setTitle, fieldAddFunction=$ NOT IMPLEMENTED: SurfaceNamer.getFieldAddFunctionName $, fieldGetFunction=getTitle, identifier=title, initCodeLine=SimpleInitCodeLineView { | |
lineType=SimpleInitLine, typeName=string, identifier=title, doc=[], needsLeadingNewline=true, initValue=SimpleInitValueView { | |
initialValue='Alices Adventures in Wonderland', isRepeated=null}}, fieldName=title, isMap=false, isArray=false, oneofConfig=null, elementTypeName=string, required=false, formatMethodName=, transformParamFunctionName=}]}, fieldName=book, isMap=false, isArray=false, oneofConfig=null, elementTypeName=google.example.library.v1.Book, required=true, formatMethodName=, transformParamFunctionName=}], importSection=ImportSectionView { | |
standardImports=[], externalImports=[], appImports=[ImportFileView { | |
moduleName=, types=[ImportTypeView { | |
fullName=$ NOT IMPLEMENTED: SurfaceNamer.getFullyQualifiedApiWrapperClassName $, nickname=getFullyQualifiedApiWrapperClassName $, type=SimpleImport}]}, ImportFileView { | |
moduleName=, types=[ImportTypeView { | |
fullName=google.example.library.v1.Book, nickname=library.v1.types.Book, type=SimpleImport}]}], serviceImports=[]}, apiFileName=library_service_client.js, versionIndexFileImportName=$ NOT IMPLEMENTED: SurfaceNamer.getVersionIndexFileImportName $, topLevelIndexFileImportName=$ NOT IMPLEMENTED: SurfaceNamer.getTopLevelIndexFileImportName $ | |
}, | |
doc = ApiMethodDocView { | |
mainDocLines=[Creates a book.], paramDocs=[SimpleParamDocView{paramName=request, typeName=Object, lines=[The request object that will be sent.]}, SimpleParamDocView{paramName=request.name, typeName=string, lines=[The name of the shelf in which the book is created.]}, SimpleParamDocView{paramName=request.book, typeName=Object, lines=[The book to create., , This object should have the same structure as [Book]{@link google.example.library.v1.Book}]}, SimpleParamDocView{paramName=[options], typeName=Object, lines=[Optional parameters. You can override the default settings for this call, e.g, timeout,, retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.]}], throwsDocLines=[], returnsDocLines=[@param {function(?Error, ?Object)} [callback], The function which will be called with the result of the API call., , The second parameter to the callback is an object representing [Book]{@link google.example.library.v1.Book}., @returns {Promise} - The promise which resolves to an array., The first element of the array is an object representing [Book]{@link google.example.library.v1.Book}., The promise has a method named "cancel" which cancels the ongoing API call.], returnTypeName=google.example.library.v1.Book, pageStreamingResourceTypeName=null}, | |
}, // END library method | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment