From 39e35412f25ed9e74f2152f1e246bfd999b52284 Mon Sep 17 00:00:00 2001 From: Sai Cheemalapati Date: Wed, 2 Nov 2016 09:55:49 -0700 Subject: [PATCH] Refactor Ruby discovery snippetgen for MVVM (#696) --- build.gradle | 2 +- .../MainDiscoveryProviderFactory.java | 18 +- .../ApiaryConfigToSampleConfigConverter.java | 11 +- .../discovery/config/TypeNameGenerator.java | 22 +- .../config/go/GoTypeNameGenerator.java | 20 +- .../config/java/JavaTypeNameGenerator.java | 5 +- .../config/ruby/RubyTypeNameGenerator.java | 114 + .../go/GoSampleMethodToViewTransformer.java | 6 +- .../go/GoSampleTypeNameConverter.java | 2 + .../java/JavaSampleTypeNameConverter.java | 2 + .../nodejs/NodeJSSampleTypeNameConverter.java | 2 + .../RubySampleMethodToViewTransformer.java | 180 + .../transformer/ruby/RubySampleNamer.java | 44 + .../ruby/RubySampleTypeNameConverter.java | 83 + .../discovery/viewmodel/SampleView.java | 12 + .../api/codegen/util/ruby/RubyTypeTable.java | 54 + .../com/google/api/codegen/nodejs/sample.snip | 2 +- .../com/google/api/codegen/ruby/sample.snip | 130 + .../adexchangebuyer.v1.4.json.overrides | 2 - .../discoveries/bigquery.v2.json.overrides | 42 + .../clouduseraccounts.beta.json.overrides | 2 - .../ruby_adexchangebuyer.v1.4.json.baseline | 614 +-- .../ruby/ruby_appengine.v1beta5.json.baseline | 370 +- .../ruby/ruby_bigquery.v2.json.baseline | 410 +- .../ruby/ruby_cloudbilling.v1.json.baseline | 87 +- .../ruby/ruby_clouddebugger.v2.json.baseline | 126 +- ...ruby_cloudmonitoring.v2beta2.json.baseline | 119 +- ...ruby_cloudresourcemanager.v1.json.baseline | 264 +- .../ruby/ruby_cloudtrace.v1.json.baseline | 52 +- .../ruby_clouduseraccounts.beta.json.baseline | 303 +- .../ruby/ruby_compute.v1.json.baseline | 4118 ++++++----------- .../ruby/ruby_container.v1.json.baseline | 233 +- .../ruby/ruby_dataflow.v1b3.json.baseline | 224 +- .../ruby/ruby_datastore.v1.json.baseline | 108 +- .../ruby_deploymentmanager.v2.json.baseline | 324 +- .../ruby/ruby_dfareporting.v2.6.json.baseline | 3428 +++++--------- .../ruby/ruby_dns.v1.json.baseline | 160 +- .../ruby/ruby_logging.v2beta1.json.baseline | 267 +- .../ruby/ruby_prediction.v1.6.json.baseline | 145 +- .../ruby/ruby_pubsub.v1.json.baseline | 440 +- ...y_replicapoolupdater.v1beta1.json.baseline | 187 +- .../ruby/ruby_sqladmin.v1beta4.json.baseline | 734 ++- .../ruby/ruby_storage.v1.json.baseline | 676 +-- .../ruby_storagetransfer.v1.json.baseline | 188 +- .../ruby/ruby_taskqueue.v1beta2.json.baseline | 159 +- .../ruby/ruby_translate.v2.json.baseline | 30 +- .../ruby/ruby_vision.v1.json.baseline | 13 +- .../sqladmin.v1beta4.json.overrides | 3 + .../storagetransfer.v1.json.overrides | 2 +- 49 files changed, 5715 insertions(+), 8824 deletions(-) create mode 100644 src/main/java/com/google/api/codegen/discovery/config/ruby/RubyTypeNameGenerator.java create mode 100644 src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleMethodToViewTransformer.java create mode 100644 src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleNamer.java create mode 100644 src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleTypeNameConverter.java create mode 100644 src/main/resources/com/google/api/codegen/ruby/sample.snip delete mode 100644 src/test/java/com/google/api/codegen/testdata/discoveries/adexchangebuyer.v1.4.json.overrides create mode 100644 src/test/java/com/google/api/codegen/testdata/discoveries/bigquery.v2.json.overrides delete mode 100644 src/test/java/com/google/api/codegen/testdata/discoveries/clouduseraccounts.beta.json.overrides diff --git a/build.gradle b/build.gradle index d055b38597..b00f625e54 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ if (System.env.TRAVIS == 'true') { groovyOptions.fork = false } tasks.withType(Test) { - maxParallelForks = 2 + maxParallelForks = 1 minHeapSize = '128m' } } diff --git a/src/main/java/com/google/api/codegen/discovery/MainDiscoveryProviderFactory.java b/src/main/java/com/google/api/codegen/discovery/MainDiscoveryProviderFactory.java index d60cad278d..f2af591255 100644 --- a/src/main/java/com/google/api/codegen/discovery/MainDiscoveryProviderFactory.java +++ b/src/main/java/com/google/api/codegen/discovery/MainDiscoveryProviderFactory.java @@ -24,18 +24,18 @@ import com.google.api.codegen.discovery.config.go.GoTypeNameGenerator; import com.google.api.codegen.discovery.config.java.JavaTypeNameGenerator; import com.google.api.codegen.discovery.config.nodejs.NodeJSTypeNameGenerator; +import com.google.api.codegen.discovery.config.ruby.RubyTypeNameGenerator; import com.google.api.codegen.discovery.transformer.SampleMethodToViewTransformer; import com.google.api.codegen.discovery.transformer.go.GoSampleMethodToViewTransformer; import com.google.api.codegen.discovery.transformer.java.JavaSampleMethodToViewTransformer; import com.google.api.codegen.discovery.transformer.nodejs.NodeJSSampleMethodToViewTransformer; +import com.google.api.codegen.discovery.transformer.ruby.RubySampleMethodToViewTransformer; import com.google.api.codegen.php.PhpDiscoveryContext; import com.google.api.codegen.php.PhpSnippetSetRunner; import com.google.api.codegen.py.PythonDiscoveryContext; import com.google.api.codegen.py.PythonDiscoveryInitializer; import com.google.api.codegen.py.PythonSnippetSetRunner; import com.google.api.codegen.rendering.CommonSnippetSetRunner; -import com.google.api.codegen.ruby.RubyDiscoveryContext; -import com.google.api.codegen.ruby.RubySnippetSetRunner; import com.google.api.codegen.util.CommonRenderingUtil; import com.google.common.collect.ImmutableMap; import com.google.protobuf.Method; @@ -62,12 +62,14 @@ public class MainDiscoveryProviderFactory implements DiscoveryProviderFactory { ImmutableMap.of( GO, GoSampleMethodToViewTransformer.class, JAVA, JavaSampleMethodToViewTransformer.class, - NODEJS, NodeJSSampleMethodToViewTransformer.class); + NODEJS, NodeJSSampleMethodToViewTransformer.class, + RUBY, RubySampleMethodToViewTransformer.class); private static final Map> TYPE_NAME_GENERATOR_MAP = ImmutableMap.of( GO, GoTypeNameGenerator.class, JAVA, JavaTypeNameGenerator.class, - NODEJS, NodeJSTypeNameGenerator.class); + NODEJS, NodeJSTypeNameGenerator.class, + RUBY, RubyTypeNameGenerator.class); public static DiscoveryProvider defaultCreate( Service service, ApiaryConfig apiaryConfig, JsonNode sampleConfigOverrides, String id) { @@ -104,14 +106,6 @@ public static DiscoveryProvider defaultCreate( new PythonDiscoveryInitializer(), SnippetSetRunner.SNIPPET_RESOURCE_ROOT)) .setSnippetFileName("py/" + DEFAULT_SNIPPET_FILE) .build(); - - } else if (id.equals(RUBY)) { - return CommonDiscoveryProvider.newBuilder() - .setContext(new RubyDiscoveryContext(service, apiaryConfig)) - .setSnippetSetRunner( - new RubySnippetSetRunner(SnippetSetRunner.SNIPPET_RESOURCE_ROOT)) - .setSnippetFileName(id + "/" + DEFAULT_SNIPPET_FILE) - .build(); } // Below is the MVVM pathway. diff --git a/src/main/java/com/google/api/codegen/discovery/config/ApiaryConfigToSampleConfigConverter.java b/src/main/java/com/google/api/codegen/discovery/config/ApiaryConfigToSampleConfigConverter.java index ba66fa9ac6..d7e45692e6 100644 --- a/src/main/java/com/google/api/codegen/discovery/config/ApiaryConfigToSampleConfigConverter.java +++ b/src/main/java/com/google/api/codegen/discovery/config/ApiaryConfigToSampleConfigConverter.java @@ -44,15 +44,14 @@ public ApiaryConfigToSampleConfigConverter( this.methods = methods; this.apiaryConfig = apiaryConfig; this.typeNameGenerator = typeNameGenerator; + typeNameGenerator.setApiNameAndVersion(apiaryConfig.getApiName(), apiaryConfig.getApiVersion()); methodNameComponents = new HashMap>(); // Since methodNameComponents are used to generate the request type name, we // produce them here for ease of access. for (Method method : methods) { - String methodName = method.getName(); - LinkedList nameComponents = new LinkedList<>(Arrays.asList(methodName.split("\\."))); - nameComponents.removeFirst(); // Removes the API name. - methodNameComponents.put(method.getName(), nameComponents); + LinkedList split = new LinkedList<>(Arrays.asList(method.getName().split("\\."))); + methodNameComponents.put(method.getName(), split); } } @@ -117,7 +116,9 @@ private MethodInfo createMethod(Method method) { MethodInfo methodInfo = MethodInfo.newBuilder() .verb(apiaryConfig.getHttpMethod(method.getName())) - .nameComponents(methodNameComponents.get(method.getName())) + .nameComponents( + typeNameGenerator.getMethodNameComponents( + methodNameComponents.get(method.getName()))) .fields(fields.build()) .requestType(requestType) .requestBodyType(requestBodyType) diff --git a/src/main/java/com/google/api/codegen/discovery/config/TypeNameGenerator.java b/src/main/java/com/google/api/codegen/discovery/config/TypeNameGenerator.java index f0fa990758..950a8478bb 100644 --- a/src/main/java/com/google/api/codegen/discovery/config/TypeNameGenerator.java +++ b/src/main/java/com/google/api/codegen/discovery/config/TypeNameGenerator.java @@ -14,14 +14,34 @@ */ package com.google.api.codegen.discovery.config; -import com.google.api.client.util.Strings; import com.google.api.codegen.DiscoveryImporter; import com.google.api.codegen.discovery.DefaultString; +import com.google.common.base.Strings; +import java.util.LinkedList; import java.util.List; /** Generates language-specific names for types and package paths. */ public class TypeNameGenerator { + /** + * Returns the language-formatted method name components. + * + *

For example: "myapi.foo.get" to ["Foo", "Get"] + */ + public List getMethodNameComponents(List nameComponents) { + LinkedList copy = new LinkedList<>(nameComponents); + // Don't edit the original object. + copy.removeFirst(); + return copy; + } + + /** + * Sets the apiName and apiVersion used for name lookups. + * + *

Only used in Ruby to filter method and type names from apiary_names.yaml + */ + public void setApiNameAndVersion(String apiName, String apiVersion) {} + /** Returns language-specific delimiter used for string literals in samples. */ public String stringDelimiter() { return "\""; diff --git a/src/main/java/com/google/api/codegen/discovery/config/go/GoTypeNameGenerator.java b/src/main/java/com/google/api/codegen/discovery/config/go/GoTypeNameGenerator.java index e78bc742d4..d791057b58 100644 --- a/src/main/java/com/google/api/codegen/discovery/config/go/GoTypeNameGenerator.java +++ b/src/main/java/com/google/api/codegen/discovery/config/go/GoTypeNameGenerator.java @@ -17,6 +17,7 @@ import com.google.api.codegen.DiscoveryImporter; import com.google.api.codegen.discovery.config.TypeNameGenerator; import com.google.api.codegen.util.Name; +import java.util.LinkedList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -26,6 +27,17 @@ public class GoTypeNameGenerator extends TypeNameGenerator { // Pattern used to rename some Go package versions. private static final Pattern SUB_VERSION = Pattern.compile("^(.+)_(v[0-9.]+)$"); + @Override + public List getMethodNameComponents(List nameComponents) { + LinkedList copy = new LinkedList(nameComponents); + // Don't edit the original object. + copy.removeFirst(); + for (int i = 0; i < copy.size(); i++) { + copy.set(i, Name.lowerCamel(copy.get(i)).toUpperCamel()); + } + return copy; + } + @Override public String getApiVersion(String apiVersion) { if (apiVersion.equals("alpha") || apiVersion.equals("beta")) { @@ -45,9 +57,11 @@ public String getPackagePrefix(String apiName, String apiVersion) { @Override public String getRequestTypeName(List methodNameComponents) { - String copy[] = methodNameComponents.toArray(new String[methodNameComponents.size() + 1]); - copy[copy.length - 1] = "call"; - return Name.lowerCamel(copy).toUpperCamel(); + LinkedList copy = new LinkedList(methodNameComponents); + copy.removeFirst(); + String arr[] = copy.toArray(new String[copy.size() + 1]); + arr[arr.length - 1] = "call"; + return Name.lowerCamel(arr).toUpperCamel(); } @Override diff --git a/src/main/java/com/google/api/codegen/discovery/config/java/JavaTypeNameGenerator.java b/src/main/java/com/google/api/codegen/discovery/config/java/JavaTypeNameGenerator.java index 27fc2a1c3a..f7d18ead47 100644 --- a/src/main/java/com/google/api/codegen/discovery/config/java/JavaTypeNameGenerator.java +++ b/src/main/java/com/google/api/codegen/discovery/config/java/JavaTypeNameGenerator.java @@ -17,7 +17,7 @@ import com.google.api.codegen.discovery.config.TypeNameGenerator; import com.google.api.codegen.util.Name; import com.google.common.base.Joiner; -import java.util.ArrayList; +import java.util.LinkedList; import java.util.List; public class JavaTypeNameGenerator extends TypeNameGenerator { @@ -33,7 +33,8 @@ public String getPackagePrefix(String apiName, String apiVersion) { @Override public String getRequestTypeName(List methodNameComponents) { - List copy = new ArrayList<>(methodNameComponents); + LinkedList copy = new LinkedList<>(methodNameComponents); + copy.removeFirst(); for (int i = 0; i < copy.size(); i++) { copy.set(i, Name.lowerCamel(copy.get(i)).toUpperCamel()); } diff --git a/src/main/java/com/google/api/codegen/discovery/config/ruby/RubyTypeNameGenerator.java b/src/main/java/com/google/api/codegen/discovery/config/ruby/RubyTypeNameGenerator.java new file mode 100644 index 0000000000..b4bae15fd1 --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/config/ruby/RubyTypeNameGenerator.java @@ -0,0 +1,114 @@ +/* Copyright 2016 Google Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.api.codegen.discovery.config.ruby; + +import com.google.api.codegen.DiscoveryImporter; +import com.google.api.codegen.discovery.config.TypeNameGenerator; +import com.google.api.codegen.ruby.RubyApiaryNameMap; +import com.google.api.codegen.util.Name; +import com.google.common.base.Joiner; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.io.Resources; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.List; +import java.util.Map; +import org.yaml.snakeyaml.Yaml; + +public class RubyTypeNameGenerator extends TypeNameGenerator { + + private String apiName; + private String apiVersion; + private final ImmutableMap NAME_MAP; + + public RubyTypeNameGenerator() { + try { + NAME_MAP = getMethodNameMap(); + } catch (IOException e) { + throw new IllegalStateException(e); + } + } + + @SuppressWarnings("unchecked") + private ImmutableMap getMethodNameMap() throws IOException { + String data = + Resources.toString( + Resources.getResource(RubyApiaryNameMap.class, "apiary_names.yaml"), + StandardCharsets.UTF_8); + // Unchecked cast here. + return ImmutableMap.copyOf((Map) (new Yaml().load(data))); + } + + @Override + public String stringDelimiter() { + return "'"; + } + + @Override + public void setApiNameAndVersion(String apiName, String apiVersion) { + this.apiName = apiName; + this.apiVersion = apiVersion; + } + + @Override + public List getMethodNameComponents(List nameComponents) { + // Generate the key by joining apiName, apiVersion and nameComponents on '.' + // Ex: "/admin:directory_v1/admin.channels.stop" + String key = "/" + apiName + ":" + apiVersion + "/" + Joiner.on('.').join(nameComponents); + if (!NAME_MAP.containsKey(key)) { + throw new IllegalArgumentException("\"" + key + "\"" + " not in method name map"); + } + return ImmutableList.of(NAME_MAP.get(key)); + } + + @Override + public String getApiVersion(String apiVersion) { + return apiVersion.replace('.', '_'); // v1.4 to v1_4 + } + + @Override + public String getPackagePrefix(String apiName, String apiVersion) { + return "google/apis/" + Name.from(apiName, apiVersion).toLowerUnderscore(); + } + + @Override + public String getApiTypeName(String apiName) { + return Name.upperCamel(apiName.replace(" ", ""), "Service").toUpperCamel(); + } + + @Override + public String getResponseTypeUrl(String responseTypeUrl) { + if (responseTypeUrl.equals(DiscoveryImporter.EMPTY_TYPE_NAME) + || responseTypeUrl.equals(DiscoveryImporter.EMPTY_TYPE_URL)) { + return ""; + } + return responseTypeUrl; + } + + @Override + public String getMessageTypeName(String messageTypeName) { + // Avoid cases like "DatasetList.Datasets" + String pieces[] = messageTypeName.split("\\."); + messageTypeName = pieces[0]; + // Generate the key by joining apiName, apiVersion and messageTypeName. + // Ex: "/bigquery:v2/DatasetList" + String key = "/" + apiName + ":" + apiVersion + "/" + messageTypeName; + if (!NAME_MAP.containsKey(key)) { + throw new IllegalArgumentException("\"" + key + "\"" + " not in method name map"); + } + return Name.from(NAME_MAP.get(key)).toUpperCamel(); + } +} diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleMethodToViewTransformer.java b/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleMethodToViewTransformer.java index bf33545ac8..62e62c7121 100644 --- a/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleMethodToViewTransformer.java +++ b/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleMethodToViewTransformer.java @@ -71,10 +71,6 @@ private SampleView createSampleView(SampleTransformerContext context) { // isn't Go specific logic in the transformer. String servicePackageName = GoSampleNamer.getServicePackageName(config.packagePrefix()); String serviceVarName = symbolTable.getNewSymbol(namer.getServiceVarName(servicePackageName)); - List methodNameComponents = new ArrayList(); - for (String nameComponent : methodInfo.nameComponents()) { - methodNameComponents.add(namer.publicFieldName(Name.lowerCamel(nameComponent))); - } String requestVarName = symbolTable.getNewSymbol(namer.localVarName(Name.lowerCamel("req"))); // For this and other type name assignments, we don't use TypeTable logic to // add to the import list. The main issue is that the TypeTable returns @@ -128,7 +124,7 @@ private SampleView createSampleView(SampleTransformerContext context) { .auth(createSampleAuthView(context)) .serviceVarName(serviceVarName) .methodVerb(methodInfo.verb()) - .methodNameComponents(methodNameComponents) + .methodNameComponents(methodInfo.nameComponents()) .requestVarName(requestVarName) .requestTypeName(requestTypeName) .hasRequestBody(hasRequestBody) diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleTypeNameConverter.java b/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleTypeNameConverter.java index 49e73c5f30..6dea26e239 100644 --- a/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleTypeNameConverter.java +++ b/src/main/java/com/google/api/codegen/discovery/transformer/go/GoSampleTypeNameConverter.java @@ -26,6 +26,7 @@ public class GoSampleTypeNameConverter implements SampleTypeNameConverter { /** A map from primitive types in proto to Go counterparts. */ private static final ImmutableMap PRIMITIVE_TYPE_MAP = ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "interface") .put(Field.Kind.TYPE_BOOL, "bool") .put(Field.Kind.TYPE_INT32, "int32") .put(Field.Kind.TYPE_INT64, "int64") @@ -40,6 +41,7 @@ public class GoSampleTypeNameConverter implements SampleTypeNameConverter { /** A map from primitive types in proto to zero value in Go. */ private static final ImmutableMap PRIMITIVE_ZERO_VALUE = ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "interface{}") .put(Field.Kind.TYPE_BOOL, "false") .put(Field.Kind.TYPE_INT32, "int64(0)") .put(Field.Kind.TYPE_INT64, "int64(0)") diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleTypeNameConverter.java b/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleTypeNameConverter.java index d72164cafe..66bfd1d25a 100644 --- a/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleTypeNameConverter.java +++ b/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleTypeNameConverter.java @@ -32,6 +32,7 @@ class JavaSampleTypeNameConverter implements SampleTypeNameConverter { /** A map from primitive types in proto to Java counterparts. */ private static final ImmutableMap PRIMIVITVE_TYPE_MAP = ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "java.lang.Object") .put(Field.Kind.TYPE_BOOL, "boolean") .put(Field.Kind.TYPE_INT32, "int") .put(Field.Kind.TYPE_INT64, "long") @@ -46,6 +47,7 @@ class JavaSampleTypeNameConverter implements SampleTypeNameConverter { /** A map from primitive types in proto to zero value in Java. */ private static final ImmutableMap PRIMITIVE_ZERO_VALUE = ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "new Object()") .put(Field.Kind.TYPE_BOOL, "false") .put(Field.Kind.TYPE_INT32, "0") .put(Field.Kind.TYPE_INT64, "0L") diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/nodejs/NodeJSSampleTypeNameConverter.java b/src/main/java/com/google/api/codegen/discovery/transformer/nodejs/NodeJSSampleTypeNameConverter.java index b28b9888d8..f1ae3c52f7 100644 --- a/src/main/java/com/google/api/codegen/discovery/transformer/nodejs/NodeJSSampleTypeNameConverter.java +++ b/src/main/java/com/google/api/codegen/discovery/transformer/nodejs/NodeJSSampleTypeNameConverter.java @@ -26,6 +26,7 @@ public class NodeJSSampleTypeNameConverter implements SampleTypeNameConverter { /** A map from primitive types in proto to NodeJS counterparts. */ private static final ImmutableMap PRIMITIVE_TYPE_MAP = ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "Object") .put(Field.Kind.TYPE_BOOL, "boolean") .put(Field.Kind.TYPE_INT32, "number") .put(Field.Kind.TYPE_INT64, "number") @@ -40,6 +41,7 @@ public class NodeJSSampleTypeNameConverter implements SampleTypeNameConverter { /** A map from primitive types in proto to zero value in NodeJS */ private static final ImmutableMap PRIMITIVE_ZERO_VALUE = ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "{}") .put(Field.Kind.TYPE_BOOL, "false") .put(Field.Kind.TYPE_INT32, "0") .put(Field.Kind.TYPE_INT64, "''") diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleMethodToViewTransformer.java b/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleMethodToViewTransformer.java new file mode 100644 index 0000000000..82245155dc --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleMethodToViewTransformer.java @@ -0,0 +1,180 @@ +/* Copyright 2016 Google Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.api.codegen.discovery.transformer.ruby; + +import com.google.api.codegen.discovery.config.FieldInfo; +import com.google.api.codegen.discovery.config.MethodInfo; +import com.google.api.codegen.discovery.config.SampleConfig; +import com.google.api.codegen.discovery.transformer.SampleMethodToViewTransformer; +import com.google.api.codegen.discovery.transformer.SampleNamer; +import com.google.api.codegen.discovery.transformer.SampleTransformerContext; +import com.google.api.codegen.discovery.transformer.SampleTypeTable; +import com.google.api.codegen.discovery.viewmodel.SampleAuthView; +import com.google.api.codegen.discovery.viewmodel.SampleFieldView; +import com.google.api.codegen.discovery.viewmodel.SamplePageStreamingView; +import com.google.api.codegen.discovery.viewmodel.SampleView; +import com.google.api.codegen.util.Name; +import com.google.api.codegen.util.SymbolTable; +import com.google.api.codegen.util.ruby.RubyTypeTable; +import com.google.api.codegen.viewmodel.ViewModel; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.Method; +import java.util.ArrayList; +import java.util.List; + +public class RubySampleMethodToViewTransformer implements SampleMethodToViewTransformer { + + private static final String TEMPLATE_FILENAME = "ruby/sample.snip"; + + // Map of rename rules for fields. + // Could be done through overrides, but this is a rule implemented in the Ruby + // client library generator. + private static final ImmutableMap FIELD_RENAMES = + ImmutableMap.of("objectId", "object_id_"); + + public RubySampleMethodToViewTransformer() {} + + @Override + public ViewModel transform(Method method, SampleConfig config) { + SampleTypeTable typeTable = + new SampleTypeTable(new RubyTypeTable(""), new RubySampleTypeNameConverter()); + SampleNamer namer = new RubySampleNamer(); + SampleTransformerContext context = + SampleTransformerContext.create(config, typeTable, namer, method.getName()); + return createSampleView(context); + } + + private SampleView createSampleView(SampleTransformerContext context) { + SampleConfig config = context.getSampleConfig(); + MethodInfo methodInfo = config.methods().get(context.getMethodName()); + SampleNamer namer = context.getSampleNamer(); + SampleTypeTable typeTable = context.getSampleTypeTable(); + SymbolTable symbolTable = SymbolTable.fromSeed(RubyTypeTable.RESERVED_IDENTIFIER_SET); + + SampleView.Builder builder = SampleView.newBuilder(); + + String serviceVarName = symbolTable.getNewSymbol(namer.getServiceVarName(config.apiTypeName())); + String serviceTypeName = typeTable.getServiceTypeName(config.apiTypeName()).getNickname(); + String serviceTypeNamespace = + RubySampleNamer.getServiceTypeNamespace(config.apiName(), config.apiVersion()); + + if (methodInfo.isPageStreaming()) { + builder.pageStreaming(createSamplePageStreamingView(context, symbolTable)); + } + + // Created before the fields in-case there are naming conflicts in the symbol table. + SampleAuthView sampleAuthView = createSampleAuthView(context); + + List fields = new ArrayList<>(); + List fieldVarNames = new ArrayList<>(); + for (FieldInfo field : methodInfo.fields().values()) { + String name = namer.localVarName(Name.lowerCamel(field.name())); + if (FIELD_RENAMES.containsKey(field.name())) { + name = FIELD_RENAMES.get(field.name()); + } + SampleFieldView sampleFieldView = + SampleFieldView.newBuilder() + .name(name) + .defaultValue(typeTable.getZeroValueAndSaveNicknameFor(field.type())) + .example(field.example()) + .description(field.description()) + .build(); + fields.add(sampleFieldView); + fieldVarNames.add(sampleFieldView.name()); + } + + boolean hasRequestBody = methodInfo.requestBodyType() != null; + if (hasRequestBody) { + String requestBodyVarName = symbolTable.getNewSymbol(namer.getRequestBodyVarName()); + builder.requestBodyVarName(requestBodyVarName); + builder.requestBodyTypeName( + typeTable.getTypeName(methodInfo.requestBodyType()).getNickname()); + fieldVarNames.add(requestBodyVarName); + } + + boolean hasResponse = methodInfo.responseType() != null; + if (hasResponse) { + builder.responseVarName(symbolTable.getNewSymbol(namer.getResponseVarName())); + } + + return builder + .templateFileName(TEMPLATE_FILENAME) + .outputPath(context.getMethodName() + ".frag.rb") + .apiTitle(config.apiTitle()) + .apiName(config.apiName()) + .apiVersion(config.apiVersion()) + .auth(sampleAuthView) + .serviceVarName(serviceVarName) + .serviceTypeName(serviceTypeName) + .methodVerb(methodInfo.verb()) + .methodNameComponents(methodInfo.nameComponents()) + .hasRequestBody(hasRequestBody) + .hasResponse(hasResponse) + .fields(fields) + .fieldVarNames(fieldVarNames) + .isPageStreaming(methodInfo.isPageStreaming()) + .hasMediaUpload(methodInfo.hasMediaUpload()) + .hasMediaDownload(methodInfo.hasMediaDownload()) + .serviceRequirePath(config.packagePrefix()) + .serviceTypeNamespace(serviceTypeNamespace) + .build(); + } + + private SampleAuthView createSampleAuthView(SampleTransformerContext context) { + SampleConfig config = context.getSampleConfig(); + MethodInfo methodInfo = config.methods().get(context.getMethodName()); + + return SampleAuthView.newBuilder() + .type(config.authType()) + .instructionsUrl(config.authInstructionsUrl()) + .scopes(methodInfo.authScopes()) + .isScopesSingular(methodInfo.authScopes().size() == 1) + .build(); + } + + private SamplePageStreamingView createSamplePageStreamingView( + SampleTransformerContext context, SymbolTable symbolTable) { + MethodInfo methodInfo = context.getSampleConfig().methods().get(context.getMethodName()); + FieldInfo fieldInfo = methodInfo.pageStreamingResourceField(); + SampleNamer namer = context.getSampleNamer(); + if (fieldInfo == null) { + throw new IllegalArgumentException("pageStreamingResourceField cannot be null"); + } + + SamplePageStreamingView.Builder builder = SamplePageStreamingView.newBuilder(); + + builder.resourceFieldName(namer.publicFieldName(Name.lowerCamel(fieldInfo.name()))); + if (fieldInfo.type().isMap()) { + // Assume that the value in the map is a message. + if (!fieldInfo.type().mapValue().isMessage()) { + throw new IllegalArgumentException("expected map value to be a message"); + } + builder.resourceKeyVarName( + symbolTable.getNewSymbol(namer.localVarName(Name.lowerCamel("name")))); + String resourceValueVarName = + namer.localVarName(Name.upperCamel(fieldInfo.type().mapValue().message().typeName())); + builder.resourceValueVarName(symbolTable.getNewSymbol(resourceValueVarName)); + } else { + String resourceVarName = + namer.getResourceVarName( + fieldInfo.type().isMessage() ? fieldInfo.type().message().typeName() : ""); + builder.resourceVarName(symbolTable.getNewSymbol(resourceVarName)); + } + builder.isResourceMap(fieldInfo.type().isMap()); + builder.pageVarName( + symbolTable.getNewSymbol(namer.localVarName(Name.lowerCamel(fieldInfo.name())))); + return builder.build(); + } +} diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleNamer.java b/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleNamer.java new file mode 100644 index 0000000000..60a6fc742b --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleNamer.java @@ -0,0 +1,44 @@ +/* Copyright 2016 Google Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.api.codegen.discovery.transformer.ruby; + +import com.google.api.codegen.discovery.transformer.SampleNamer; +import com.google.api.codegen.util.Name; +import com.google.api.codegen.util.ruby.RubyNameFormatter; +import com.google.common.base.Joiner; + +public class RubySampleNamer extends SampleNamer { + + public RubySampleNamer() { + super(new RubyNameFormatter()); + } + + public static String getServiceTypeNamespace(String apiName, String apiVersion) { + // The version suffix doesn't seem to follow any particular pattern other + // than that the first character is capitalized. + apiVersion = apiVersion.substring(0, 1).toUpperCase() + apiVersion.substring(1); + // For whatever reason the namespace that contains the service constructor + // isn't based on apiTypeName, so generate it from the apiName and + // apiVersion instead. + // Ex: "Google::Apis::MyapiV1beta1" instead of "Google::Apis::MyApiV1beta1" + return Joiner.on("::") + .join("Google", "Apis", Name.lowerCamel(apiName).toUpperCamel() + apiVersion); + } + + @Override + public String getServiceVarName(String apiTypeName) { + return localVarName(Name.from("service")); + } +} diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleTypeNameConverter.java b/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleTypeNameConverter.java new file mode 100644 index 0000000000..f4f0c38b6e --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/transformer/ruby/RubySampleTypeNameConverter.java @@ -0,0 +1,83 @@ +/* Copyright 2016 Google Inc + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.api.codegen.discovery.transformer.ruby; + +import com.google.api.codegen.discovery.config.TypeInfo; +import com.google.api.codegen.discovery.transformer.SampleTypeNameConverter; +import com.google.api.codegen.util.TypeName; +import com.google.api.codegen.util.TypedValue; +import com.google.common.collect.ImmutableMap; +import com.google.protobuf.Field; + +/** Maps SampleConfig and TypeInfo instances to Ruby specific TypeName instances. */ +class RubySampleTypeNameConverter implements SampleTypeNameConverter { + + /** A map from primitive types in proto to zero value in Ruby. */ + private static final ImmutableMap PRIMITIVE_ZERO_VALUE = + ImmutableMap.builder() + .put(Field.Kind.TYPE_UNKNOWN, "{}") + .put(Field.Kind.TYPE_BOOL, "false") + .put(Field.Kind.TYPE_INT32, "0") + .put(Field.Kind.TYPE_INT64, "''") + .put(Field.Kind.TYPE_UINT32, "0") + .put(Field.Kind.TYPE_UINT64, "''") + .put(Field.Kind.TYPE_FLOAT, "0.0") + .put(Field.Kind.TYPE_DOUBLE, "0.0") + .put(Field.Kind.TYPE_STRING, "''") + .put(Field.Kind.TYPE_ENUM, "''") + .build(); + + public RubySampleTypeNameConverter() {} + + @Override + public TypeName getServiceTypeName(String apiTypeName) { + return new TypeName(apiTypeName); + } + + @Override + public TypeName getRequestTypeName(String apiTypeName, TypeInfo typeInfo) { + // N/A + return null; + } + + @Override + public TypeName getTypeName(TypeInfo typeInfo) { + // This method is only ever called for the request body type, which should + // always be a message. + if (typeInfo.isMessage()) { + return new TypeName(typeInfo.message().typeName()); + } + return getTypeNameForElementType(typeInfo); + } + + @Override + public TypeName getTypeNameForElementType(TypeInfo typeInfo) { + throw new IllegalArgumentException("unknown type kind: " + typeInfo.kind()); + } + + @Override + public TypedValue getZeroValue(TypeInfo typeInfo) { + if (typeInfo.isMap()) { + return TypedValue.create(new TypeName("Hash"), "{}"); + } + if (typeInfo.isArray()) { + return TypedValue.create(new TypeName("Array"), "[]"); + } + if (PRIMITIVE_ZERO_VALUE.containsKey(typeInfo.kind())) { + return TypedValue.create(new TypeName("Object"), PRIMITIVE_ZERO_VALUE.get(typeInfo.kind())); + } + throw new IllegalArgumentException("unknown type kind: " + typeInfo.kind()); + } +} diff --git a/src/main/java/com/google/api/codegen/discovery/viewmodel/SampleView.java b/src/main/java/com/google/api/codegen/discovery/viewmodel/SampleView.java index cf8bf6dd27..f3803381e6 100644 --- a/src/main/java/com/google/api/codegen/discovery/viewmodel/SampleView.java +++ b/src/main/java/com/google/api/codegen/discovery/viewmodel/SampleView.java @@ -58,6 +58,7 @@ public String resourceRoot() { public abstract List methodNameComponents(); + @Nullable public abstract String requestVarName(); @Nullable @@ -117,6 +118,13 @@ public String resourceRoot() { @Nullable public abstract String contextVarName(); + // Ruby specific section... + @Nullable + public abstract String serviceRequirePath(); + + @Nullable + public abstract String serviceTypeNamespace(); + public static Builder newBuilder() { return new AutoValue_SampleView.Builder(); } @@ -196,6 +204,10 @@ public abstract static class Builder { public abstract Builder contextVarName(String val); + public abstract Builder serviceRequirePath(String val); + + public abstract Builder serviceTypeNamespace(String val); + public abstract SampleView build(); } } diff --git a/src/main/java/com/google/api/codegen/util/ruby/RubyTypeTable.java b/src/main/java/com/google/api/codegen/util/ruby/RubyTypeTable.java index 2edc3a7ee0..2a0f8a6227 100644 --- a/src/main/java/com/google/api/codegen/util/ruby/RubyTypeTable.java +++ b/src/main/java/com/google/api/codegen/util/ruby/RubyTypeTable.java @@ -20,6 +20,7 @@ import com.google.api.codegen.util.TypeName; import com.google.api.codegen.util.TypeTable; import com.google.common.collect.HashBiMap; +import com.google.common.collect.ImmutableSet; import java.util.Map; import java.util.TreeMap; @@ -88,4 +89,57 @@ public String getAndSaveNicknameForInnerType( String containerFullName, String innerTypeShortName) { return dynamicTypeTable.getAndSaveNicknameForInnerType(containerFullName, innerTypeShortName); } + + /** + * : A set of ruby keywords and built-ins. keywords: + * http://docs.ruby-lang.org/en/2.3.0/keywords_rdoc.html + */ + public static final ImmutableSet RESERVED_IDENTIFIER_SET = + ImmutableSet.builder() + .add( + "__ENCODING__", + "__LINE__", + "__FILE__", + "BEGIN", + "END", + "alias", + "and", + "begin", + "break", + "case", + "class", + "def", + "defined?", + "do", + "else", + "elsif", + "end", + "ensure", + "false", + "for", + "if", + "in", + "module", + "next", + "nil", + "not", + "or", + "redo", + "rescue", + "retry", + "return", + "self", + "super", + "then", + "true", + "undef", + "unless", + "until", + "when", + "while", + "yield", + // "options" is here because it's a common keyword argument to + // specify a CallOptions instance. + "options") + .build(); } diff --git a/src/main/resources/com/google/api/codegen/nodejs/sample.snip b/src/main/resources/com/google/api/codegen/nodejs/sample.snip index 6e4da69a52..23856c816e 100644 --- a/src/main/resources/com/google/api/codegen/nodejs/sample.snip +++ b/src/main/resources/com/google/api/codegen/nodejs/sample.snip @@ -4,7 +4,7 @@ // 1. If not already done, enable the {@class.apiTitle} // and check the quota for your project at // https://console.developers.google.com/apis/api/{@class.apiName} - @switch {@class.auth.type} + @switch class.auth.type @case "APPLICATION_DEFAULT_CREDENTIALS" // 2. This sample uses Application Default Credentials for authentication. // If not already done, install the gcloud CLI from diff --git a/src/main/resources/com/google/api/codegen/ruby/sample.snip b/src/main/resources/com/google/api/codegen/ruby/sample.snip new file mode 100644 index 0000000000..51dfe7590e --- /dev/null +++ b/src/main/resources/com/google/api/codegen/ruby/sample.snip @@ -0,0 +1,130 @@ +@snippet generate(class) + @# BEFORE RUNNING: + @# --------------- + @# 1. If not already done, enable the {@class.apiTitle} + @# and check the quota for your project at + @# https://console.developers.google.com/apis/api/{@class.apiName} + @switch class.auth.type + @case "APPLICATION_DEFAULT_CREDENTIALS" + @# 2. This sample uses Application Default Credentials for authentication. + @# If not already done, install the gcloud CLI from + @# https://cloud.google.com/sdk and run + @# `gcloud beta auth application-default login` + @# For more information, see: + @# https://developers.google.com/identity/protocols/application-default-credentials + @# 3. Install the Ruby client library and Application Default Credentials + @# library by running `gem install google-api-client` and + @# `gem install googleauth` + @default + @# 2. Install the Ruby client library by running `gem install google-api-client` + @end + + require 'googleauth' + require '{@class.serviceRequirePath}' + @if class.hasResponse + require 'json' + @end + + {@class.serviceVarName} = {@class.serviceTypeNamespace}::{@class.serviceTypeName}.new + + @switch class.auth.type + @case "APPLICATION_DEFAULT_CREDENTIALS" + {@class.serviceVarName}.authorization = {@"\"} + Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) + @case "OAUTH_3L" + @# TODO: Change placeholder below to generate authentication credentials. See: + @# {@class.auth.instructionsUrl} + @# + @if class.auth.isScopesSingular + @# Authorize using the following scope: + @else + @# Authorize using one of the following scopes: + @end + @join scope : class.auth.scopes + @# {@scope} + @end + {@class.serviceVarName}.authorization = nil + @case "API_KEY" + {@class.serviceVarName}.key = '' @# TODO: Update placeholder with desired API key. + @end + + @join field : class.fields if class.fields + @if field.description + @join line : util.getDocLines(field.description, 100) + @# {@line} + @end + + + @end + {@field.name} = {@field.defaultValue} @# TODO: Update placeholder value. + @if field.example + @# {@field.example} + @end + + @end + @if class.hasRequestBody + @if class.methodVerb == "PATCH" + @# TODO: Assign values to desired members of `{@class.requestBodyVarName}`. Only assigned + @# fields will be changed: + @else + @# TODO: Assign values to desired members of `{@class.requestBodyVarName}`: + @end + + {@class.requestBodyVarName} = {@class.serviceTypeNamespace}::{@class.requestBodyTypeName}.new + + @end + @if class.hasMediaUpload + @# TODO: Add desired media content for upload. For more information, see: + @# https://github.com/google/google-api-ruby-client#basic-usage + @# https://github.com/google/google-api-ruby-client#media + + @end + @if class.hasMediaDownload + @# TODO: Specify destination to download media content, if desired. For more information, see: + @# https://github.com/google/google-api-ruby-client#basic-usage + @# https://github.com/google/google-api-ruby-client#media + + @end + @if class.isPageStreaming + {@class.pageStreaming.pageVarName} = {@class.serviceVarName}.fetch_all(items: :{@class.pageStreaming.resourceFieldName}) do |token| + @if class.fieldVarNames + {@class.serviceVarName}.{@callChain(class.methodNameComponents)}({@paramList(class.fieldVarNames)}, page_token: token) + @else + {@class.serviceVarName}.{@callChain(class.methodNameComponents)}(page_token: token) + @end + end + + @if class.pageStreaming.isResourceMap + {@class.pageStreaming.pageVarName}.each do |{@class.pageStreaming.resourceKeyVarName}, {@class.pageStreaming.resourceValueVarName}| + @# TODO: Change code below to process each ({@class.pageStreaming.resourceKeyVarName}, {@class.pageStreaming.resourceValueVarName}) pair: + puts String({@class.pageStreaming.resourceKeyVarName} << " => " << JSON.pretty_generate({@class.pageStreaming.resourceValueVarName}) + end + @else + {@class.pageStreaming.pageVarName}.each do |{@class.pageStreaming.resourceVarName}| + @# TODO: Change code below to process each `{@class.pageStreaming.resourceVarName}` resource: + puts JSON.pretty_generate({@class.pageStreaming.resourceVarName}) + end + @end + @else + @if class.hasResponse + {@class.responseVarName} = {@class.serviceVarName}.{@callChain(class.methodNameComponents)}({@paramList(class.fieldVarNames)}) + + @# TODO: Change code below to process the `{@class.responseVarName}` object: + puts JSON.pretty_generate({@class.responseVarName}) + @else + {@class.serviceVarName}.{@callChain(class.methodNameComponents)}({@paramList(class.fieldVarNames)}) + @end + @end +@end + +@private callChain(methodNameComponents) + @join resource : methodNameComponents on "." + {@resource} + @end +@end + +@private paramList(fieldVarNames) + @join fieldVarName : fieldVarNames on ", " + {@fieldVarName} + @end +@end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/adexchangebuyer.v1.4.json.overrides b/src/test/java/com/google/api/codegen/testdata/discoveries/adexchangebuyer.v1.4.json.overrides deleted file mode 100644 index 2c63c08510..0000000000 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/adexchangebuyer.v1.4.json.overrides +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/bigquery.v2.json.overrides b/src/test/java/com/google/api/codegen/testdata/discoveries/bigquery.v2.json.overrides new file mode 100644 index 0000000000..7a874d15d6 --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/bigquery.v2.json.overrides @@ -0,0 +1,42 @@ +{ + "ruby": { + "methods": { + "bigquery.datasets.list": { + "pageStreamingResourceField": { + "type": { + "message": { + "typeName": "Dataset" + } + } + } + }, + "bigquery.jobs.list": { + "pageStreamingResourceField": { + "type": { + "message": { + "typeName": "Job" + } + } + } + }, + "bigquery.projects.list": { + "pageStreamingResourceField": { + "type": { + "message": { + "typeName": "Project" + } + } + } + }, + "bigquery.tables.list": { + "pageStreamingResourceField": { + "type": { + "message": { + "typeName": "Table" + } + } + } + } + } + } +} \ No newline at end of file diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/clouduseraccounts.beta.json.overrides b/src/test/java/com/google/api/codegen/testdata/discoveries/clouduseraccounts.beta.json.overrides deleted file mode 100644 index 2c63c08510..0000000000 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/clouduseraccounts.beta.json.overrides +++ /dev/null @@ -1,2 +0,0 @@ -{ -} diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline index 9ec572c4a1..5bbdb39321 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_adexchangebuyer.v1.4.json.baseline @@ -5,27 +5,23 @@ # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_account` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `get_account` method: - # The account id -id = 0 +id = 0 # TODO: Update placeholder value. - -# Perform the call response = service.get_account(id) # TODO: Change code below to process the `response` object: @@ -36,21 +32,20 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_accounts` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# Perform the call response = service.list_accounts() # TODO: Change code below to process the `response` object: @@ -61,31 +56,27 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_account` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `patch_account` method: - # The account id -id = 0 - +id = 0 # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AdexchangebuyerV1_4::Account.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_account(id, request_body) # TODO: Change code below to process the `response` object: @@ -96,31 +87,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_account` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_account` method: - # The account id -id = 0 - +id = 0 # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::Account.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_account(id, request_body) # TODO: Change code below to process the `response` object: @@ -131,27 +117,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_billing_info` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `get_billing_info` method: - # The account id. -account_id = 0 - +account_id = 0 # TODO: Update placeholder value. -# Perform the call response = service.get_billing_info(account_id) # TODO: Change code below to process the `response` object: @@ -162,21 +144,20 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_billing_infos` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# Perform the call response = service.list_billing_infos() # TODO: Change code below to process the `response` object: @@ -187,30 +168,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_budget` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_budget` method: - # The account id to get the budget information for. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The billing id to get the budget information for. -billing_id = '' +billing_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_budget(account_id, billing_id) # TODO: Change code below to process the `response` object: @@ -221,34 +198,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_budget` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_budget` method: - # The account id associated with the budget being updated. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The billing id associated with the budget being updated. -billing_id = '' - +billing_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AdexchangebuyerV1_4::Budget.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_budget(account_id, billing_id, request_body) # TODO: Change code below to process the `response` object: @@ -259,34 +232,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_budget` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_budget` method: - # The account id associated with the budget being updated. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The billing id associated with the budget being updated. -billing_id = '' - +billing_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::Budget.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_budget(account_id, billing_id, request_body) # TODO: Change code below to process the `response` object: @@ -297,33 +265,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `add_creative_deal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `add_creative_deal` method: - # The id for the account that will serve this creative. -account_id = 0 +account_id = 0 # TODO: Update placeholder value. # The buyer-specific id for this creative. -buyer_creative_id = '{MY-BUYER-CREATIVE-ID}' +buyer_creative_id = '' # TODO: Update placeholder value. # The id of the deal id to associate with this creative. -deal_id = '' +deal_id = '' # TODO: Update placeholder value. - -# Perform the call service.add_creative_deal(account_id, buyer_creative_id, deal_id) # BEFORE RUNNING: # --------------- @@ -331,30 +294,26 @@ service.add_creative_deal(account_id, buyer_creative_id, deal_id) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_creative` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_creative` method: - # The id for the account that will serve this creative. -account_id = 0 +account_id = 0 # TODO: Update placeholder value. # The buyer-specific id for this creative. -buyer_creative_id = '{MY-BUYER-CREATIVE-ID}' - +buyer_creative_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_creative(account_id, buyer_creative_id) # TODO: Change code below to process the `response` object: @@ -365,25 +324,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_creative` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::Creative.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_creative(request_body) # TODO: Change code below to process the `response` object: @@ -394,23 +351,22 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_creatives` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# Perform the call items = service.fetch_all(items: :items) do |token| - service.list_creatives(, page_token: token) + service.list_creatives(page_token: token) end items.each do |creative| @@ -423,30 +379,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_creative_deals` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_creative_deals` method: - # The id for the account that will serve this creative. -account_id = 0 +account_id = 0 # TODO: Update placeholder value. # The buyer-specific id for this creative. -buyer_creative_id = '{MY-BUYER-CREATIVE-ID}' +buyer_creative_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_creative_deals(account_id, buyer_creative_id) # TODO: Change code below to process the `response` object: @@ -457,33 +409,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `remove_creative_deal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `remove_creative_deal` method: - # The id for the account that will serve this creative. -account_id = 0 +account_id = 0 # TODO: Update placeholder value. # The buyer-specific id for this creative. -buyer_creative_id = '{MY-BUYER-CREATIVE-ID}' +buyer_creative_id = '' # TODO: Update placeholder value. # The id of the deal id to disassociate with this creative. -deal_id = '' +deal_id = '' # TODO: Update placeholder value. - -# Perform the call service.remove_creative_deal(account_id, buyer_creative_id, deal_id) # BEFORE RUNNING: # --------------- @@ -491,31 +438,26 @@ service.remove_creative_deal(account_id, buyer_creative_id, deal_id) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_marketplacedeal_order_deals` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `delete_marketplacedeal_order_deals` method: - # The proposalId to delete deals from. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::DeleteOrderDealsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.delete_marketplacedeal_order_deals(proposal_id, request_body) # TODO: Change code below to process the `response` object: @@ -526,31 +468,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_marketplacedeal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_marketplacedeal` method: - # proposalId for which deals need to be added. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::AddOrderDealsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_marketplacedeal(proposal_id, request_body) # TODO: Change code below to process the `response` object: @@ -561,28 +498,24 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_marketplacedeals` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_marketplacedeals` method: - # The proposalId to get deals for. To search across all proposals specify order_id = '-' as part of # the URL. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_marketplacedeals(proposal_id) # TODO: Change code below to process the `response` object: @@ -593,31 +526,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_marketplacedeal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_marketplacedeal` method: - # The proposalId to edit deals on. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::EditAllOrderDealsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_marketplacedeal(proposal_id, request_body) # TODO: Change code below to process the `response` object: @@ -628,31 +556,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_marketplacenote` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_marketplacenote` method: - # The proposalId to add notes for. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::AddOrderNotesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_marketplacenote(proposal_id, request_body) # TODO: Change code below to process the `response` object: @@ -663,28 +586,24 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_marketplacenotes` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_marketplacenotes` method: - # The proposalId to get notes for. To search across all proposals specify order_id = '-' as part of # the URL. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_marketplacenotes(proposal_id) # TODO: Change code below to process the `response` object: @@ -695,31 +614,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_marketplace_private_auction_proposal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_marketplace_private_auction_proposal` method: - # The private auction id to be updated. -private_auction_id = '{MY-PRIVATE-AUCTION-ID}' - +private_auction_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::UpdatePrivateAuctionProposalRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.update_marketplace_private_auction_proposal(private_auction_id, request_body) # BEFORE RUNNING: # --------------- @@ -727,33 +640,29 @@ service.update_marketplace_private_auction_proposal(private_auction_id, request_ # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_performance_reports` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_performance_reports` method: - # The account id to get the reports. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The end time of the report in ISO 8601 timestamp format using UTC. -end_date_time = '{MY-END-DATE-TIME}' +end_date_time = '' # TODO: Update placeholder value. # The start time of the report in ISO 8601 timestamp format using UTC. -start_date_time = '{MY-START-DATE-TIME}' - +start_date_time = '' # TODO: Update placeholder value. -# Perform the call response = service.list_performance_reports(account_id, end_date_time, start_date_time) # TODO: Change code below to process the `response` object: @@ -764,30 +673,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_pretargeting_config` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_pretargeting_config` method: - # The account id to delete the pretargeting config for. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The specific id of the configuration to delete. -config_id = '' - +config_id = '' # TODO: Update placeholder value. -# Perform the call service.delete_pretargeting_config(account_id, config_id) # BEFORE RUNNING: # --------------- @@ -795,30 +699,26 @@ service.delete_pretargeting_config(account_id, config_id) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_pretargeting_config` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_pretargeting_config` method: - # The account id to get the pretargeting config for. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The specific id of the configuration to retrieve. -config_id = '' +config_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_pretargeting_config(account_id, config_id) # TODO: Change code below to process the `response` object: @@ -829,31 +729,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_pretargeting_config` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_pretargeting_config` method: - # The account id to insert the pretargeting config for. -account_id = '' - +account_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::PretargetingConfig.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_pretargeting_config(account_id, request_body) # TODO: Change code below to process the `response` object: @@ -864,27 +759,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_pretargeting_configs` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_pretargeting_configs` method: - # The account id to get the pretargeting configs for. -account_id = '' - +account_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_pretargeting_configs(account_id) # TODO: Change code below to process the `response` object: @@ -895,34 +786,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_pretargeting_config` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_pretargeting_config` method: - # The account id to update the pretargeting config for. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The specific id of the configuration to update. -config_id = '' - +config_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AdexchangebuyerV1_4::PretargetingConfig.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_pretargeting_config(account_id, config_id, request_body) # TODO: Change code below to process the `response` object: @@ -933,34 +820,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_pretargeting_config` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_pretargeting_config` method: - # The account id to update the pretargeting config for. -account_id = '' +account_id = '' # TODO: Update placeholder value. # The specific id of the configuration to update. -config_id = '' - +config_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::PretargetingConfig.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_pretargeting_config(account_id, config_id, request_body) # TODO: Change code below to process the `response` object: @@ -971,27 +853,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_product` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `get_product` method: - # The id for the product to get the head revision for. -product_id = '{MY-PRODUCT-ID}' +product_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_product(product_id) # TODO: Change code below to process the `response` object: @@ -1002,21 +880,20 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `search_products` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# Perform the call response = service.search_products() # TODO: Change code below to process the `response` object: @@ -1027,27 +904,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_proposal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `get_proposal` method: - # Id of the proposal to retrieve. -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_proposal(proposal_id) # TODO: Change code below to process the `response` object: @@ -1058,25 +931,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_proposal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::CreateOrdersRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_proposal(request_body) # TODO: Change code below to process the `response` object: @@ -1087,40 +958,36 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_proposal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_proposal` method: - # The proposal id to update. -proposal_id = '{MY-PROPOSAL-ID}' - -# The last known revision number to update. If the head revision in the marketplace database has since -# changed, an error will be thrown. The caller should then fetch the latest proposal at head revision -# and retry the update at that revision. -revision_number = '' +proposal_id = '' # TODO: Update placeholder value. -# The proposed action to take on the proposal. This field is required and it must be set when updating -# a proposal. -update_action = '{MY-UPDATE-ACTION}' +# The last known revision number to update. If the head revision in the marketplace database has +# since changed, an error will be thrown. The caller should then fetch the latest proposal at head +# revision and retry the update at that revision. +revision_number = '' # TODO: Update placeholder value. +# The proposed action to take on the proposal. This field is required and it must be set when +# updating a proposal. +update_action = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AdexchangebuyerV1_4::Proposal.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_proposal(proposal_id, revision_number, update_action, request_body) # TODO: Change code below to process the `response` object: @@ -1131,21 +998,20 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `search_proposals` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# Perform the call response = service.search_proposals() # TODO: Change code below to process the `response` object: @@ -1156,27 +1022,22 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' -require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `proposal_setup_complete` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `proposal_setup_complete` method: - # The proposal id for which the setup is complete -proposal_id = '{MY-PROPOSAL-ID}' - +proposal_id = '' # TODO: Update placeholder value. -# Perform the call service.proposal_setup_complete(proposal_id) # BEFORE RUNNING: # --------------- @@ -1184,40 +1045,35 @@ service.proposal_setup_complete(proposal_id) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_proposal` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_proposal` method: - # The proposal id to update. -proposal_id = '{MY-PROPOSAL-ID}' +proposal_id = '' # TODO: Update placeholder value. -# The last known revision number to update. If the head revision in the marketplace database has since -# changed, an error will be thrown. The caller should then fetch the latest proposal at head revision -# and retry the update at that revision. -revision_number = '' - -# The proposed action to take on the proposal. This field is required and it must be set when updating -# a proposal. -update_action = '{MY-UPDATE-ACTION}' +# The last known revision number to update. If the head revision in the marketplace database has +# since changed, an error will be thrown. The caller should then fetch the latest proposal at head +# revision and retry the update at that revision. +revision_number = '' # TODO: Update placeholder value. +# The proposed action to take on the proposal. This field is required and it must be set when +# updating a proposal. +update_action = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AdexchangebuyerV1_4::Proposal.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_proposal(proposal_id, revision_number, update_action, request_body) # TODO: Change code below to process the `response` object: @@ -1228,27 +1084,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/adexchangebuyer # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/adexchangebuyer_v1_4' require 'json' service = Google::Apis::AdexchangebuyerV1_4::AdExchangeBuyerService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_pub_profiles` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/adexchange.buyer service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_pub_profiles` method: - # The accountId of the publisher to get profiles for. -account_id = 0 - +account_id = 0 # TODO: Update placeholder value. -# Perform the call response = service.list_pub_profiles(account_id) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline index 2a8e6b0ac6..ee451357ee 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_appengine.v1beta5.json.baseline @@ -6,29 +6,26 @@ # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AppengineV1beta5::Application.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_app(request_body) # TODO: Change code below to process the `response` object: @@ -40,31 +37,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_app` method: - # Part of `name`. Name of the application to get. Example: `apps/myapp`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_app(apps_id) # TODO: Change code below to process the `response` object: @@ -76,34 +68,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_app_location` method: - # Part of `name`. Resource name for the location. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -locations_id = '{MY-LOCATIONS-ID}' - +locations_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_app_location(apps_id, locations_id) # TODO: Change code below to process the `response` object: @@ -115,31 +102,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_app_locations` method: - # Part of `name`. The resource that owns the locations collection, if applicable. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. - -# Perform the call locations = service.fetch_all(items: :locations) do |token| service.list_app_locations(apps_id, page_token: token) end @@ -155,34 +137,29 @@ end # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_app_operation` method: - # Part of `name`. The name of the operation resource. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -operations_id = '{MY-OPERATIONS-ID}' - +operations_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_app_operation(apps_id, operations_id) # TODO: Change code below to process the `response` object: @@ -194,31 +171,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_app_operations` method: - # Part of `name`. The name of the operation collection. -apps_id = '{MY-APPS-ID}' - +apps_id = '' # TODO: Update placeholder value. -# Perform the call operations = service.fetch_all(items: :operations) do |token| service.list_app_operations(apps_id, page_token: token) end @@ -234,35 +206,30 @@ end # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `patch_app` method: - # Part of `name`. Name of the application to update. Example: `apps/myapp`. -apps_id = '{MY-APPS-ID}' - +apps_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AppengineV1beta5::Application.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_app(apps_id, request_body) # TODO: Change code below to process the `response` object: @@ -274,34 +241,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_app_service` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' - +services_id = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_app_service(apps_id, services_id) # TODO: Change code below to process the `response` object: @@ -313,34 +275,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_app_service` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_app_service(apps_id, services_id) # TODO: Change code below to process the `response` object: @@ -352,38 +309,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_app_services` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp`. -apps_id = '{MY-APPS-ID}' - +apps_id = '' # TODO: Update placeholder value. -# Perform the call services = service.fetch_all(items: :services) do |token| service.list_app_services(apps_id, page_token: token) end -services.each do |service| - # TODO: Change code below to process each `service` resource: - puts JSON.pretty_generate(service) +services.each do |service2| + # TODO: Change code below to process each `service2` resource: + puts JSON.pretty_generate(service2) end # BEFORE RUNNING: # --------------- @@ -392,38 +344,33 @@ end # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_app_service` method: - # Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' - +services_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AppengineV1beta5::Service.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_app_service(apps_id, services_id, request_body) # TODO: Change code below to process the `response` object: @@ -435,38 +382,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `create_app_service_version` method: - # Part of `name`. Name of the resource to update. For example: "apps/myapp/services/default". -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' - +services_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AppengineV1beta5::Version.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_app_service_version(apps_id, services_id, request_body) # TODO: Change code below to process the `response` object: @@ -478,37 +419,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_app_service_version` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' +versions_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_app_service_version(apps_id, services_id, versions_id) # TODO: Change code below to process the `response` object: @@ -520,37 +456,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_app_service_version` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' - +versions_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_app_service_version(apps_id, services_id, versions_id) # TODO: Change code below to process the `response` object: @@ -562,45 +493,39 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `debug_instance` method: - # Part of `name`. Name of the resource requested. Example: # `apps/myapp/services/default/versions/v1/instances/instance-1`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' +versions_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -instances_id = '{MY-INSTANCES-ID}' - +instances_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::AppengineV1beta5::DebugInstanceRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.debug_instance(apps_id, services_id, versions_id, instances_id, request_body) # TODO: Change code below to process the `response` object: @@ -612,41 +537,36 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_app_service_version_instance` method: - # Part of `name`. Name of the resource requested. For example: # "apps/myapp/services/default/versions/v1/instances/instance-1". -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' +versions_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -instances_id = '{MY-INSTANCES-ID}' +instances_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_app_service_version_instance(apps_id, services_id, versions_id, instances_id) # TODO: Change code below to process the `response` object: @@ -658,41 +578,36 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_app_service_version_instance` method: - # Part of `name`. Name of the resource requested. Example: # `apps/myapp/services/default/versions/v1/instances/instance-1`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' +versions_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -instances_id = '{MY-INSTANCES-ID}' - +instances_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_app_service_version_instance(apps_id, services_id, versions_id, instances_id) # TODO: Change code below to process the `response` object: @@ -704,37 +619,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_app_service_version_instances` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' +versions_id = '' # TODO: Update placeholder value. - -# Perform the call instances = service.fetch_all(items: :instances) do |token| service.list_app_service_version_instances(apps_id, services_id, versions_id, page_token: token) end @@ -750,34 +660,29 @@ end # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_app_service_versions` method: - # Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' - +services_id = '' # TODO: Update placeholder value. -# Perform the call versions = service.fetch_all(items: :versions) do |token| service.list_app_service_versions(apps_id, services_id, page_token: token) end @@ -793,41 +698,36 @@ end # https://console.developers.google.com/apis/api/appengine # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/appengine_v1beta5' require 'json' service = Google::Apis::AppengineV1beta5::AppengineService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_app_service_version` method: - # Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default/versions/1`. -apps_id = '{MY-APPS-ID}' +apps_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -services_id = '{MY-SERVICES-ID}' +services_id = '' # TODO: Update placeholder value. # Part of `name`. See documentation of `appsId`. -versions_id = '{MY-VERSIONS-ID}' - +versions_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::AppengineV1beta5::Version.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_app_service_version(apps_id, services_id, versions_id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline index e2d50177f8..9c7ab6336d 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_bigquery.v2.json.baseline @@ -6,34 +6,28 @@ # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_dataset` method: - # Project ID of the dataset being deleted -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of dataset being deleted -dataset_id = '{MY-DATASET-ID}' - +dataset_id = '' # TODO: Update placeholder value. -# Perform the call service.delete_dataset(project_id, dataset_id) # BEFORE RUNNING: # --------------- @@ -42,34 +36,29 @@ service.delete_dataset(project_id, dataset_id) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_dataset` method: - # Project ID of the requested dataset -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the requested dataset -dataset_id = '{MY-DATASET-ID}' - +dataset_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_dataset(project_id, dataset_id) # TODO: Change code below to process the `response` object: @@ -81,35 +70,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_dataset` method: - # Project ID of the new dataset -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::Dataset.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_dataset(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -121,38 +104,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_datasets` method: - # Project ID of the datasets to be listed -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. -# Perform the call datasets = service.fetch_all(items: :datasets) do |token| service.list_datasets(project_id, page_token: token) end -datasets.each do |dataset_list._datasets| - # TODO: Change code below to process each `dataset_list._datasets` resource: - puts JSON.pretty_generate(dataset_list._datasets) +datasets.each do |dataset| + # TODO: Change code below to process each `dataset` resource: + puts JSON.pretty_generate(dataset) end # BEFORE RUNNING: # --------------- @@ -161,38 +139,33 @@ end # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_dataset` method: - # Project ID of the dataset being updated -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the dataset being updated -dataset_id = '{MY-DATASET-ID}' - +dataset_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::BigqueryV2::Dataset.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_dataset(project_id, dataset_id, request_body) # TODO: Change code below to process the `response` object: @@ -204,38 +177,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_dataset` method: - # Project ID of the dataset being updated -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the dataset being updated -dataset_id = '{MY-DATASET-ID}' - +dataset_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::Dataset.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_dataset(project_id, dataset_id, request_body) # TODO: Change code below to process the `response` object: @@ -247,34 +214,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `cancel_job` method: - # [Required] Project ID of the job to cancel -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # [Required] Job ID of the job to cancel -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. -# Perform the call response = service.cancel_job(project_id, job_id) # TODO: Change code below to process the `response` object: @@ -286,34 +248,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_job` method: - # [Required] Project ID of the requested job -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # [Required] Job ID of the requested job -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_job(project_id, job_id) # TODO: Change code below to process the `response` object: @@ -325,34 +282,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_job_query_results` method: - # [Required] Project ID of the query job -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # [Required] Job ID of the query job -job_id = '{MY-JOB-ID}' +job_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_job_query_results(project_id, job_id) # TODO: Change code below to process the `response` object: @@ -364,40 +316,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_job` method: - # Project ID of the project that will be billed for the job -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::Job.new -# TODO: Assign values to desired members of the `request_body` object. - # TODO: Add desired media content for upload. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.insert_job(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -409,38 +354,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_jobs` method: - # Project ID of the jobs to list -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. -# Perform the call jobs = service.fetch_all(items: :jobs) do |token| service.list_jobs(project_id, page_token: token) end -jobs.each do |job_list._jobs| - # TODO: Change code below to process each `job_list._jobs` resource: - puts JSON.pretty_generate(job_list._jobs) +jobs.each do |job| + # TODO: Change code below to process each `job` resource: + puts JSON.pretty_generate(job) end # BEFORE RUNNING: # --------------- @@ -449,35 +389,29 @@ end # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `query_job` method: - # Project ID of the project billed for the query -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::QueryRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.query_job(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -489,32 +423,30 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call projects = service.fetch_all(items: :projects) do |token| - service.list_projects(, page_token: token) + service.list_projects(page_token: token) end -projects.each do |project_list._projects| - # TODO: Change code below to process each `project_list._projects` resource: - puts JSON.pretty_generate(project_list._projects) +projects.each do |project| + # TODO: Change code below to process each `project` resource: + puts JSON.pretty_generate(project) end # BEFORE RUNNING: # --------------- @@ -523,41 +455,35 @@ end # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_all_table_data` method: - # Project ID of the destination table. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the destination table. -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. # Table ID of the destination table. -table_id = '{MY-TABLE-ID}' - +table_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::InsertAllTableDataRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_all_table_data(project_id, dataset_id, table_id, request_body) # TODO: Change code below to process the `response` object: @@ -569,37 +495,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_table_data` method: - # Project ID of the table to read -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the table to read -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. # Table ID of the table to read -table_id = '{MY-TABLE-ID}' +table_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_table_data(project_id, dataset_id, table_id) # TODO: Change code below to process the `response` object: @@ -611,37 +532,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' -require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_table` method: - # Project ID of the table to delete -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the table to delete -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. # Table ID of the table to delete -table_id = '{MY-TABLE-ID}' - +table_id = '' # TODO: Update placeholder value. -# Perform the call service.delete_table(project_id, dataset_id, table_id) # BEFORE RUNNING: # --------------- @@ -650,37 +565,32 @@ service.delete_table(project_id, dataset_id, table_id) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_table` method: - # Project ID of the requested table -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the requested table -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. # Table ID of the requested table -table_id = '{MY-TABLE-ID}' +table_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_table(project_id, dataset_id, table_id) # TODO: Change code below to process the `response` object: @@ -692,38 +602,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_table` method: - # Project ID of the new table -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the new table -dataset_id = '{MY-DATASET-ID}' - +dataset_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::Table.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_table(project_id, dataset_id, request_body) # TODO: Change code below to process the `response` object: @@ -735,41 +639,36 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_tables` method: - # Project ID of the tables to list -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the tables to list -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. - -# Perform the call tables = service.fetch_all(items: :tables) do |token| service.list_tables(project_id, dataset_id, page_token: token) end -tables.each do |table_list._tables| - # TODO: Change code below to process each `table_list._tables` resource: - puts JSON.pretty_generate(table_list._tables) +tables.each do |table| + # TODO: Change code below to process each `table` resource: + puts JSON.pretty_generate(table) end # BEFORE RUNNING: # --------------- @@ -778,41 +677,36 @@ end # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_table` method: - # Project ID of the table to update -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the table to update -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. # Table ID of the table to update -table_id = '{MY-TABLE-ID}' - +table_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::BigqueryV2::Table.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_table(project_id, dataset_id, table_id, request_body) # TODO: Change code below to process the `response` object: @@ -824,41 +718,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/bigquery # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/bigquery_v2' require 'json' service = Google::Apis::BigqueryV2::BigqueryService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_table` method: - # Project ID of the table to update -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Dataset ID of the table to update -dataset_id = '{MY-DATASET-ID}' +dataset_id = '' # TODO: Update placeholder value. # Table ID of the table to update -table_id = '{MY-TABLE-ID}' - +table_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::BigqueryV2::Table.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_table(project_id, dataset_id, table_id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline index 465e910314..08e8cbaf52 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudbilling.v1.json.baseline @@ -6,32 +6,28 @@ # https://console.developers.google.com/apis/api/cloudbilling # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudbilling_v1' require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_billing_account` method: - # The resource name of the billing account to retrieve. For example, # `billingAccounts/012345-567890-ABCDEF`. -name = 'billingAccounts/{MY-BILLINGACCOUNT}' +name = '' # TODO: Update placeholder value. +# ex: 'billingAccounts/my-billingAccount' - -# Perform the call response = service.get_billing_account(name) # TODO: Change code below to process the `response` object: @@ -43,30 +39,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudbilling # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudbilling_v1' require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call -billingAccounts = service.fetch_all(items: :billingAccounts) do |token| - service.list_billing_accounts(, page_token: token) +billing_accounts = service.fetch_all(items: :billing_accounts) do |token| + service.list_billing_accounts(page_token: token) end -billingAccounts.each do |billing_account| +billing_accounts.each do |billing_account| # TODO: Change code below to process each `billing_account` resource: puts JSON.pretty_generate(billing_account) end @@ -77,37 +71,33 @@ end # https://console.developers.google.com/apis/api/cloudbilling # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudbilling_v1' require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_billing_account_projects` method: - # The resource name of the billing account associated with the projects that you want to list. For # example, `billingAccounts/012345-567890-ABCDEF`. -name = 'billingAccounts/{MY-BILLINGACCOUNT}' - +name = '' # TODO: Update placeholder value. +# ex: 'billingAccounts/my-billingAccount' -# Perform the call -projectBillingInfo = service.fetch_all(items: :projectBillingInfo) do |token| +project_billing_info2 = service.fetch_all(items: :project_billing_info) do |token| service.list_billing_account_projects(name, page_token: token) end -projectBillingInfo.each do |project_billing_info| +project_billing_info2.each do |project_billing_info| # TODO: Change code below to process each `project_billing_info` resource: puts JSON.pretty_generate(project_billing_info) end @@ -118,32 +108,28 @@ end # https://console.developers.google.com/apis/api/cloudbilling # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudbilling_v1' require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_project_billing_info` method: - # The resource name of the project for which billing information is retrieved. For example, # `projects/tokyo-rain-123`. -name = 'projects/{MY-PROJECT}' +name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' - -# Perform the call response = service.get_project_billing_info(name) # TODO: Change code below to process the `response` object: @@ -155,36 +141,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudbilling # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudbilling_v1' require 'json' service = Google::Apis::CloudbillingV1::CloudbillingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `update_project_billing_info` method: - # The resource name of the project associated with the billing information that you want to update. # For example, `projects/tokyo-rain-123`. -name = 'projects/{MY-PROJECT}' - +name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudbillingV1::ProjectBillingInfo.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_project_billing_info(name, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline index aa6c70a0fc..b5f5b7966d 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouddebugger.v2.json.baseline @@ -6,31 +6,26 @@ # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_controller_debuggee_breakpoints` method: - # Identifies the debuggee. -debuggee_id = '{MY-DEBUGGEE-ID}' - +debuggee_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_controller_debuggee_breakpoints(debuggee_id) # TODO: Change code below to process the `response` object: @@ -42,38 +37,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_active_breakpoint` method: - # Identifies the debuggee being debugged. -debuggee_id = '{MY-DEBUGGEE-ID}' +debuggee_id = '' # TODO: Update placeholder value. # Breakpoint identifier, unique in the scope of the debuggee. -id = '{MY-ID}' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouddebuggerV2::UpdateActiveBreakpointRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_active_breakpoint(debuggee_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -85,29 +74,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouddebuggerV2::RegisterDebuggeeRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.register_debuggee(request_body) # TODO: Change code below to process the `response` object: @@ -119,34 +105,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' -require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_debugger_debuggee_breakpoint` method: - # ID of the debuggee whose breakpoint to delete. -debuggee_id = '{MY-DEBUGGEE-ID}' +debuggee_id = '' # TODO: Update placeholder value. # ID of the breakpoint to delete. -breakpoint_id = '{MY-BREAKPOINT-ID}' +breakpoint_id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id) # BEFORE RUNNING: # --------------- @@ -155,34 +135,29 @@ service.delete_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_debugger_debuggee_breakpoint` method: - # ID of the debuggee whose breakpoint to get. -debuggee_id = '{MY-DEBUGGEE-ID}' +debuggee_id = '' # TODO: Update placeholder value. # ID of the breakpoint to get. -breakpoint_id = '{MY-BREAKPOINT-ID}' +breakpoint_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_debugger_debuggee_breakpoint(debuggee_id, breakpoint_id) # TODO: Change code below to process the `response` object: @@ -194,31 +169,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_debugger_debuggee_breakpoints` method: - # ID of the debuggee whose breakpoints to list. -debuggee_id = '{MY-DEBUGGEE-ID}' +debuggee_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_debugger_debuggee_breakpoints(debuggee_id) # TODO: Change code below to process the `response` object: @@ -230,35 +200,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `set_debugger_debuggee_breakpoint` method: - # ID of the debuggee where the breakpoint is to be set. -debuggee_id = '{MY-DEBUGGEE-ID}' - +debuggee_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouddebuggerV2::Breakpoint.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_debugger_debuggee_breakpoint(debuggee_id, request_body) # TODO: Change code below to process the `response` object: @@ -270,25 +234,23 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouddebugger # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouddebugger_v2' require 'json' service = Google::Apis::ClouddebuggerV2::CloudDebuggerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call response = service.list_debugger_debuggees() # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline index 8c5a2c1aaf..0ed28394ec 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudmonitoring.v2beta2.json.baseline @@ -6,35 +6,29 @@ # https://console.developers.google.com/apis/api/cloudmonitoring # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_metric_descriptor` method: - # The project id. The value can be the numeric project ID or string-based project name. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudmonitoringV2beta2::MetricDescriptor.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_metric_descriptor(project, request_body) # TODO: Change code below to process the `response` object: @@ -46,34 +40,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudmonitoring # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_metric_descriptor` method: - # The project ID to which the metric belongs. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the metric. -metric = '{MY-METRIC}' +metric = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_metric_descriptor(project, metric) # TODO: Change code below to process the `response` object: @@ -85,35 +74,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudmonitoring # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_metric_descriptors` method: - # The project id. The value can be the numeric project ID or string-based project name. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudmonitoringV2beta2::ListMetricDescriptorsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call metrics = service.fetch_all(items: :metrics) do |token| service.list_metric_descriptors(project, request_body, page_token: token) end @@ -129,48 +112,42 @@ end # https://console.developers.google.com/apis/api/cloudmonitoring # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_timeseries` method: - # The project ID to which this time series belongs. The value can be the numeric project ID or # string-based project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, # compute.googleapis.com/instance/disk/read_ops_count. -metric = '{MY-METRIC}' +metric = '' # TODO: Update placeholder value. # End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. -youngest = '{MY-YOUNGEST}' - +youngest = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call -timeseries = service.fetch_all(items: :timeseries) do |token| +timeseries2 = service.fetch_all(items: :timeseries) do |token| service.list_timeseries(project, metric, youngest, request_body, page_token: token) end -timeseries.each do |timeseries| +timeseries2.each do |timeseries| # TODO: Change code below to process each `timeseries` resource: puts JSON.pretty_generate(timeseries) end @@ -181,35 +158,29 @@ end # https://console.developers.google.com/apis/api/cloudmonitoring # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `write_timeseries` method: - # The project ID. The value can be the numeric project ID or string-based project name. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudmonitoringV2beta2::WriteTimeseriesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.write_timeseries(project, request_body) # TODO: Change code below to process the `response` object: @@ -221,43 +192,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudmonitoring # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudmonitoring_v2beta2' require 'json' service = Google::Apis::CloudmonitoringV2beta2::CloudMonitoringService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_timeseries_descriptors` method: - # The project ID to which this time series belongs. The value can be the numeric project ID or # string-based project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Metric names are protocol-free URLs as listed in the Supported Metrics page. For example, # compute.googleapis.com/instance/disk/read_ops_count. -metric = '{MY-METRIC}' +metric = '' # TODO: Update placeholder value. # End of the time interval (inclusive), which is expressed as an RFC 3339 timestamp. -youngest = '{MY-YOUNGEST}' - +youngest = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudmonitoringV2beta2::ListTimeseriesDescriptorsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call timeseries = service.fetch_all(items: :timeseries) do |token| service.list_timeseries_descriptors(project, metric, youngest, request_body, page_token: token) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline index 8bf1bf4eef..1103711152 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudresourcemanager.v1.json.baseline @@ -6,31 +6,26 @@ # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_operation` method: - # The name of the operation resource. -name = '{MY-NAME}' +name = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_operation(name) # TODO: Change code below to process the `response` object: @@ -42,31 +37,27 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_organization` method: - # The resource name of the Organization to fetch, e.g. "organizations/1234". -name = 'organizations/{MY-ORGANIZATION}' +name = '' # TODO: Update placeholder value. +# ex: 'organizations/my-organization' - -# Perform the call response = service.get_organization(name) # TODO: Change code below to process the `response` object: @@ -78,36 +69,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'organizations/my-organization' -# TODO: Change placeholder below to desired parameter value for the `get_organization_iam_policy` method: - -# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'organizations/{MY-ORGANIZATION}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.get_organization_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -119,29 +105,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::SearchOrganizationsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call organizations = service.fetch_all(items: :organizations) do |token| service.search_organizations(request_body, page_token: token) end @@ -157,36 +140,31 @@ end # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'organizations/my-organization' -# TODO: Change placeholder below to desired parameter value for the `set_organization_iam_policy` method: - -# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'organizations/{MY-ORGANIZATION}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_organization_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -198,36 +176,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `test_organization_iam_permissions` method: - # REQUIRED: The resource for which the policy detail is being requested. `resource` is usually # specified as a path. For example, a Project resource is specified as `projects/{project}`. -resource = 'organizations/{MY-ORGANIZATION}' - +resource = '' # TODO: Update placeholder value. +# ex: 'organizations/my-organization' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.test_organization_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: @@ -239,29 +212,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::Project.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_project(request_body) # TODO: Change code below to process the `response` object: @@ -273,31 +243,25 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_project` method: - # The Project ID (for example, `foo-bar-123`). Required. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_project(project_id) # BEFORE RUNNING: # --------------- @@ -306,31 +270,26 @@ service.delete_project(project_id) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_project` method: - # The Project ID (for example, `my-project-123`). Required. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_project(project_id) # TODO: Change code below to process the `response` object: @@ -342,36 +301,30 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. -# TODO: Change placeholder below to desired parameter value for the `get_project_iam_policy` method: - -# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = '{MY-RESOURCE}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::GetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.get_project_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -383,27 +336,25 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call projects = service.fetch_all(items: :projects) do |token| - service.list_projects(, page_token: token) + service.list_projects(page_token: token) end projects.each do |project| @@ -417,36 +368,30 @@ end # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. -# TODO: Change placeholder below to desired parameter value for the `set_project_iam_policy` method: - -# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = '{MY-RESOURCE}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::SetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_project_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -458,36 +403,30 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `test_project_iam_permissions` method: - # REQUIRED: The resource for which the policy detail is being requested. `resource` is usually # specified as a path. For example, a Project resource is specified as `projects/{project}`. -resource = '{MY-RESOURCE}' - +resource = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::TestIamPermissionsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.test_project_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: @@ -499,35 +438,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' -require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `undelete_project` method: - # The project ID (for example, `foo-bar-123`). Required. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::UndeleteProjectRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.undelete_project(project_id, request_body) # BEFORE RUNNING: # --------------- @@ -536,35 +468,29 @@ service.undelete_project(project_id, request_body) # https://console.developers.google.com/apis/api/cloudresourcemanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudresourcemanager_v1' require 'json' service = Google::Apis::CloudresourcemanagerV1::CloudResourceManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `update_project` method: - # The project ID (for example, `my-project-123`). Required. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::CloudresourcemanagerV1::Project.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_project(project_id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline index 5a04def11b..e45d9a9136 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_cloudtrace.v1.json.baseline @@ -6,35 +6,29 @@ # https://console.developers.google.com/apis/api/cloudtrace # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudtrace_v1' -require 'json' service = Google::Apis::CloudtraceV1::CloudTraceService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `patch_project_traces` method: - # ID of the Cloud project where the trace data is stored. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::CloudtraceV1::Traces.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call service.patch_project_traces(project_id, request_body) # BEFORE RUNNING: # --------------- @@ -43,34 +37,29 @@ service.patch_project_traces(project_id, request_body) # https://console.developers.google.com/apis/api/cloudtrace # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudtrace_v1' require 'json' service = Google::Apis::CloudtraceV1::CloudTraceService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_project_trace` method: - # ID of the Cloud project where the trace data is stored. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # ID of the trace to return. -trace_id = '{MY-TRACE-ID}' +trace_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_project_trace(project_id, trace_id) # TODO: Change code below to process the `response` object: @@ -82,31 +71,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/cloudtrace # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/cloudtrace_v1' require 'json' service = Google::Apis::CloudtraceV1::CloudTraceService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_project_traces` method: - # ID of the Cloud project where the trace data is stored. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. -# Perform the call traces = service.fetch_all(items: :traces) do |token| service.list_project_traces(project_id, page_token: token) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline index 37da16d9a1..93d01563bb 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_clouduseraccounts.beta.json.baseline @@ -6,34 +6,28 @@ # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' -require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_global_accounts_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Operations resource to delete. -operation = '{MY-OPERATION}' - +operation = '' # TODO: Update placeholder value. -# Perform the call service.delete_global_accounts_operation(project, operation) # BEFORE RUNNING: # --------------- @@ -42,34 +36,29 @@ service.delete_global_accounts_operation(project, operation) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_global_accounts_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Operations resource to return. -operation = '{MY-OPERATION}' +operation = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_global_accounts_operation(project, operation) # TODO: Change code below to process the `response` object: @@ -81,31 +70,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_global_accounts_operations` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_global_accounts_operations(project, page_token: token) end @@ -121,38 +105,32 @@ end # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `add_group_member` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the group for this request. -group_name = '{MY-GROUP-NAME}' - +group_name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouduseraccountsBeta::GroupsAddMemberRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.add_group_member(project, group_name, request_body) # TODO: Change code below to process the `response` object: @@ -164,34 +142,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_group` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Group resource to delete. -group_name = '{MY-GROUP-NAME}' - +group_name = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_group(project, group_name) # TODO: Change code below to process the `response` object: @@ -203,34 +176,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_group` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Group resource to return. -group_name = '{MY-GROUP-NAME}' - +group_name = '' # TODO: Update placeholder value. -# Perform the call response = service.get_group(project, group_name) # TODO: Change code below to process the `response` object: @@ -242,35 +210,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_group` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouduseraccountsBeta::Group.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_group(project, request_body) # TODO: Change code below to process the `response` object: @@ -282,31 +244,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_groups` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_groups(project, page_token: token) end @@ -322,38 +279,32 @@ end # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `remove_group_member` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the group for this request. -group_name = '{MY-GROUP-NAME}' - +group_name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouduseraccountsBeta::GroupsRemoveMemberRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.remove_group_member(project, group_name, request_body) # TODO: Change code below to process the `response` object: @@ -365,40 +316,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_linux_authorized_keys_view` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The user account for which you want to get a list of authorized public keys. -user = '{MY-USER}' +user = '' # TODO: Update placeholder value. # The fully-qualified URL of the virtual machine requesting the view. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.get_linux_authorized_keys_view(project, zone, user, instance) # TODO: Change code below to process the `response` object: @@ -410,37 +356,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_linux_linux_account_views` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The fully-qualified URL of the virtual machine requesting the views. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_linux_linux_account_views(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -452,38 +393,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `add_user_public_key` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the user for this request. -user = '{MY-USER}' - +user = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouduseraccountsBeta::PublicKey.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.add_user_public_key(project, user, request_body) # TODO: Change code below to process the `response` object: @@ -495,34 +430,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_user` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the user resource to delete. -user = '{MY-USER}' +user = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_user(project, user) # TODO: Change code below to process the `response` object: @@ -534,34 +464,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_user` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the user resource to return. -user = '{MY-USER}' - +user = '' # TODO: Update placeholder value. -# Perform the call response = service.get_user(project, user) # TODO: Change code below to process the `response` object: @@ -573,35 +498,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_user` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ClouduseraccountsBeta::User.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_user(project, request_body) # TODO: Change code below to process the `response` object: @@ -613,31 +532,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_users` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_users(project, page_token: token) end @@ -653,38 +567,33 @@ end # https://console.developers.google.com/apis/api/clouduseraccounts # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/clouduseraccounts_beta' require 'json' service = Google::Apis::ClouduseraccountsBeta::CloudUserAccountsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `remove_user_public_key` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the user for this request. -user = '{MY-USER}' +user = '' # TODO: Update placeholder value. # The fingerprint of the public key to delete. Public keys are identified by their fingerprint, which # is defined by RFC4716 to be the MD5 digest of the public key. -fingerprint = '{MY-FINGERPRINT}' - +fingerprint = '' # TODO: Update placeholder value. -# Perform the call response = service.remove_user_public_key(project, user, fingerprint) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline index 9cb673a660..ed555df5d1 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_compute.v1.json.baseline @@ -6,38 +6,33 @@ # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_addresses` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_addresses(project, page_token: token) end items.each do |name, addresses_scoped_list| # TODO: Change code below to process each (name, addresses_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(addresses_scoped_list) + puts String(name << " => " << JSON.pretty_generate(addresses_scoped_list) end # BEFORE RUNNING: # --------------- @@ -46,37 +41,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_address` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the address resource to delete. -address = '{MY-ADDRESS}' - +address = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_address(project, region, address) # TODO: Change code below to process the `response` object: @@ -88,37 +78,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_address` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the address resource to return. -address = '{MY-ADDRESS}' - +address = '' # TODO: Update placeholder value. -# Perform the call response = service.get_address(project, region, address) # TODO: Change code below to process the `response` object: @@ -130,38 +115,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_address` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Address.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_address(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -173,34 +152,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_addresses` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_addresses(project, region, page_token: token) end @@ -216,38 +190,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_autoscalers` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_autoscalers(project, page_token: token) end items.each do |name, autoscalers_scoped_list| # TODO: Change code below to process each (name, autoscalers_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(autoscalers_scoped_list) + puts String(name << " => " << JSON.pretty_generate(autoscalers_scoped_list) end # BEFORE RUNNING: # --------------- @@ -256,37 +225,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_autoscaler` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the autoscaler to delete. -autoscaler = '{MY-AUTOSCALER}' +autoscaler = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_autoscaler(project, zone, autoscaler) # TODO: Change code below to process the `response` object: @@ -298,37 +262,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_autoscaler` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the autoscaler to return. -autoscaler = '{MY-AUTOSCALER}' +autoscaler = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_autoscaler(project, zone, autoscaler) # TODO: Change code below to process the `response` object: @@ -340,38 +299,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_autoscaler` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Autoscaler.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_autoscaler(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -383,34 +336,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_autoscalers` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_autoscalers(project, zone, page_token: token) end @@ -426,41 +374,36 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_autoscaler` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the autoscaler to update. -autoscaler = '{MY-AUTOSCALER}' - +autoscaler = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::Autoscaler.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_autoscaler(project, zone, autoscaler, request_body) # TODO: Change code below to process the `response` object: @@ -472,38 +415,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_autoscaler` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Autoscaler.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_autoscaler(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -515,34 +452,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_backend_service` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the BackendService resource to delete. -backend_service = '{MY-BACKEND-SERVICE}' - +backend_service = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_backend_service(project, backend_service) # TODO: Change code below to process the `response` object: @@ -554,34 +486,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_backend_service` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the BackendService resource to return. -backend_service = '{MY-BACKEND-SERVICE}' - +backend_service = '' # TODO: Update placeholder value. -# Perform the call response = service.get_backend_service(project, backend_service) # TODO: Change code below to process the `response` object: @@ -593,38 +520,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_backend_service_health` method: - -# project -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the BackendService resource to which the queried instance belongs. -backend_service = '{MY-BACKEND-SERVICE}' - +backend_service = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::ResourceGroupReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.get_backend_service_health(project, backend_service, request_body) # TODO: Change code below to process the `response` object: @@ -636,35 +556,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_backend_service` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::BackendService.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_backend_service(project, request_body) # TODO: Change code below to process the `response` object: @@ -676,31 +590,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_backend_services` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_backend_services(project, page_token: token) end @@ -716,38 +625,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_backend_service` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the BackendService resource to update. -backend_service = '{MY-BACKEND-SERVICE}' - +backend_service = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::BackendService.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_backend_service(project, backend_service, request_body) # TODO: Change code below to process the `response` object: @@ -759,38 +663,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_backend_service` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the BackendService resource to update. -backend_service = '{MY-BACKEND-SERVICE}' - +backend_service = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::BackendService.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_backend_service(project, backend_service, request_body) # TODO: Change code below to process the `response` object: @@ -802,38 +700,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_disk_types` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_disk_types(project, page_token: token) end items.each do |name, disk_types_scoped_list| # TODO: Change code below to process each (name, disk_types_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(disk_types_scoped_list) + puts String(name << " => " << JSON.pretty_generate(disk_types_scoped_list) end # BEFORE RUNNING: # --------------- @@ -842,37 +735,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_disk_type` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the disk type to return. -disk_type = '{MY-DISK-TYPE}' - +disk_type = '' # TODO: Update placeholder value. -# Perform the call response = service.get_disk_type(project, zone, disk_type) # TODO: Change code below to process the `response` object: @@ -884,34 +772,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_disk_types` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_disk_types(project, zone, page_token: token) end @@ -927,38 +810,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_disk(project, page_token: token) end items.each do |name, disks_scoped_list| # TODO: Change code below to process each (name, disks_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(disks_scoped_list) + puts String(name << " => " << JSON.pretty_generate(disks_scoped_list) end # BEFORE RUNNING: # --------------- @@ -967,41 +845,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `create_disk_snapshot` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the persistent disk to snapshot. -disk = '{MY-DISK}' - +disk = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Snapshot.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_disk_snapshot(project, zone, disk, request_body) # TODO: Change code below to process the `response` object: @@ -1013,37 +885,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the persistent disk to delete. -disk = '{MY-DISK}' +disk = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_disk(project, zone, disk) # TODO: Change code below to process the `response` object: @@ -1055,37 +922,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the persistent disk to return. -disk = '{MY-DISK}' +disk = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_disk(project, zone, disk) # TODO: Change code below to process the `response` object: @@ -1097,38 +959,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Disk.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_disk(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -1140,34 +996,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_disks` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_disks(project, zone, page_token: token) end @@ -1183,41 +1034,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `resize_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The name of the persistent disk. -disk = '{MY-DISK}' - +disk = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::DisksResizeRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.resize_disk(project, zone, disk, request_body) # TODO: Change code below to process the `response` object: @@ -1229,34 +1074,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_firewall` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the firewall rule to delete. -firewall = '{MY-FIREWALL}' +firewall = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_firewall(project, firewall) # TODO: Change code below to process the `response` object: @@ -1268,34 +1108,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_firewall` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the firewall rule to return. -firewall = '{MY-FIREWALL}' +firewall = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_firewall(project, firewall) # TODO: Change code below to process the `response` object: @@ -1307,35 +1142,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_firewall` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Firewall.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_firewall(project, request_body) # TODO: Change code below to process the `response` object: @@ -1347,31 +1176,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_firewalls` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_firewalls(project, page_token: token) end @@ -1387,38 +1211,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_firewall` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the firewall rule to update. -firewall = '{MY-FIREWALL}' - +firewall = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::Firewall.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_firewall(project, firewall, request_body) # TODO: Change code below to process the `response` object: @@ -1430,38 +1249,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_firewall` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the firewall rule to update. -firewall = '{MY-FIREWALL}' - +firewall = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Firewall.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_firewall(project, firewall, request_body) # TODO: Change code below to process the `response` object: @@ -1473,38 +1286,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_forwarding_rules` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_forwarding_rules(project, page_token: token) end items.each do |name, forwarding_rules_scoped_list| # TODO: Change code below to process each (name, forwarding_rules_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(forwarding_rules_scoped_list) + puts String(name << " => " << JSON.pretty_generate(forwarding_rules_scoped_list) end # BEFORE RUNNING: # --------------- @@ -1513,37 +1321,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_forwarding_rule` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the ForwardingRule resource to delete. -forwarding_rule = '{MY-FORWARDING-RULE}' - +forwarding_rule = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_forwarding_rule(project, region, forwarding_rule) # TODO: Change code below to process the `response` object: @@ -1555,37 +1358,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_forwarding_rule` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the ForwardingRule resource to return. -forwarding_rule = '{MY-FORWARDING-RULE}' - +forwarding_rule = '' # TODO: Update placeholder value. -# Perform the call response = service.get_forwarding_rule(project, region, forwarding_rule) # TODO: Change code below to process the `response` object: @@ -1597,38 +1395,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_forwarding_rule` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::ForwardingRule.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_forwarding_rule(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -1640,34 +1432,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_forwarding_rules` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_forwarding_rules(project, region, page_token: token) end @@ -1683,41 +1470,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_forwarding_rule_target` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the ForwardingRule resource in which target is to be set. -forwarding_rule = '{MY-FORWARDING-RULE}' - +forwarding_rule = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_forwarding_rule_target(project, region, forwarding_rule, request_body) # TODO: Change code below to process the `response` object: @@ -1729,34 +1510,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_global_address` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the address resource to delete. -address = '{MY-ADDRESS}' - +address = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_global_address(project, address) # TODO: Change code below to process the `response` object: @@ -1768,34 +1544,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_global_address` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the address resource to return. -address = '{MY-ADDRESS}' - +address = '' # TODO: Update placeholder value. -# Perform the call response = service.get_global_address(project, address) # TODO: Change code below to process the `response` object: @@ -1807,35 +1578,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_global_address` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Address.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_global_address(project, request_body) # TODO: Change code below to process the `response` object: @@ -1847,31 +1612,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_global_addresses` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_global_addresses(project, page_token: token) end @@ -1887,34 +1647,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_global_forwarding_rule` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the ForwardingRule resource to delete. -forwarding_rule = '{MY-FORWARDING-RULE}' +forwarding_rule = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_global_forwarding_rule(project, forwarding_rule) # TODO: Change code below to process the `response` object: @@ -1926,34 +1681,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_global_forwarding_rule` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the ForwardingRule resource to return. -forwarding_rule = '{MY-FORWARDING-RULE}' +forwarding_rule = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_global_forwarding_rule(project, forwarding_rule) # TODO: Change code below to process the `response` object: @@ -1965,35 +1715,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_global_forwarding_rule` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::ForwardingRule.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_global_forwarding_rule(project, request_body) # TODO: Change code below to process the `response` object: @@ -2005,31 +1749,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_global_forwarding_rules` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_global_forwarding_rules(project, page_token: token) end @@ -2045,38 +1784,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_global_forwarding_rule_target` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the ForwardingRule resource in which target is to be set. -forwarding_rule = '{MY-FORWARDING-RULE}' - +forwarding_rule = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_global_forwarding_rule_target(project, forwarding_rule, request_body) # TODO: Change code below to process the `response` object: @@ -2088,38 +1821,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_global_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_global_operation(project, page_token: token) end items.each do |name, operations_scoped_list| # TODO: Change code below to process each (name, operations_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(operations_scoped_list) + puts String(name << " => " << JSON.pretty_generate(operations_scoped_list) end # BEFORE RUNNING: # --------------- @@ -2128,34 +1856,28 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_global_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Operations resource to delete. -operation = '{MY-OPERATION}' - +operation = '' # TODO: Update placeholder value. -# Perform the call service.delete_global_operation(project, operation) # BEFORE RUNNING: # --------------- @@ -2164,34 +1886,29 @@ service.delete_global_operation(project, operation) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_global_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Operations resource to return. -operation = '{MY-OPERATION}' - +operation = '' # TODO: Update placeholder value. -# Perform the call response = service.get_global_operation(project, operation) # TODO: Change code below to process the `response` object: @@ -2203,31 +1920,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_global_operations` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_global_operations(project, page_token: token) end @@ -2243,34 +1955,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HealthCheck resource to delete. -health_check = '{MY-HEALTH-CHECK}' - +health_check = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_health_check(project, health_check) # TODO: Change code below to process the `response` object: @@ -2282,34 +1989,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HealthCheck resource to return. -health_check = '{MY-HEALTH-CHECK}' - +health_check = '' # TODO: Update placeholder value. -# Perform the call response = service.get_health_check(project, health_check) # TODO: Change code below to process the `response` object: @@ -2321,35 +2023,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::HealthCheck.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_health_check(project, request_body) # TODO: Change code below to process the `response` object: @@ -2361,31 +2057,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_health_checks` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_health_checks(project, page_token: token) end @@ -2401,38 +2092,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HealthCheck resource to update. -health_check = '{MY-HEALTH-CHECK}' - +health_check = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::HealthCheck.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_health_check(project, health_check, request_body) # TODO: Change code below to process the `response` object: @@ -2444,38 +2130,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HealthCheck resource to update. -health_check = '{MY-HEALTH-CHECK}' - +health_check = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::HealthCheck.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_health_check(project, health_check, request_body) # TODO: Change code below to process the `response` object: @@ -2487,34 +2167,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_http_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpHealthCheck resource to delete. -http_health_check = '{MY-HTTP-HEALTH-CHECK}' +http_health_check = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_http_health_check(project, http_health_check) # TODO: Change code below to process the `response` object: @@ -2526,34 +2201,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_http_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpHealthCheck resource to return. -http_health_check = '{MY-HTTP-HEALTH-CHECK}' +http_health_check = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_http_health_check(project, http_health_check) # TODO: Change code below to process the `response` object: @@ -2565,35 +2235,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_http_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::HttpHealthCheck.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_http_health_check(project, request_body) # TODO: Change code below to process the `response` object: @@ -2605,31 +2269,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_http_health_checks` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_http_health_checks(project, page_token: token) end @@ -2645,38 +2304,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_http_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpHealthCheck resource to update. -http_health_check = '{MY-HTTP-HEALTH-CHECK}' - +http_health_check = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::HttpHealthCheck.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_http_health_check(project, http_health_check, request_body) # TODO: Change code below to process the `response` object: @@ -2688,38 +2342,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_http_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpHealthCheck resource to update. -http_health_check = '{MY-HTTP-HEALTH-CHECK}' - +http_health_check = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::HttpHealthCheck.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_http_health_check(project, http_health_check, request_body) # TODO: Change code below to process the `response` object: @@ -2731,34 +2379,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_https_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpsHealthCheck resource to delete. -https_health_check = '{MY-HTTPS-HEALTH-CHECK}' - +https_health_check = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_https_health_check(project, https_health_check) # TODO: Change code below to process the `response` object: @@ -2770,34 +2413,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_https_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpsHealthCheck resource to return. -https_health_check = '{MY-HTTPS-HEALTH-CHECK}' - +https_health_check = '' # TODO: Update placeholder value. -# Perform the call response = service.get_https_health_check(project, https_health_check) # TODO: Change code below to process the `response` object: @@ -2809,35 +2447,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_https_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::HttpsHealthCheck.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_https_health_check(project, request_body) # TODO: Change code below to process the `response` object: @@ -2849,31 +2481,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_https_health_checks` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_https_health_checks(project, page_token: token) end @@ -2889,38 +2516,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_https_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpsHealthCheck resource to update. -https_health_check = '{MY-HTTPS-HEALTH-CHECK}' - +https_health_check = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::HttpsHealthCheck.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_https_health_check(project, https_health_check, request_body) # TODO: Change code below to process the `response` object: @@ -2932,38 +2554,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_https_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the HttpsHealthCheck resource to update. -https_health_check = '{MY-HTTPS-HEALTH-CHECK}' - +https_health_check = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::HttpsHealthCheck.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_https_health_check(project, https_health_check, request_body) # TODO: Change code below to process the `response` object: @@ -2975,34 +2591,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_image` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the image resource to delete. -image = '{MY-IMAGE}' +image = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_image(project, image) # TODO: Change code below to process the `response` object: @@ -3014,38 +2625,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `deprecate_image` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Image name. -image = '{MY-IMAGE}' - +image = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::DeprecationStatus.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.deprecate_image(project, image, request_body) # TODO: Change code below to process the `response` object: @@ -3057,34 +2662,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_image` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the image resource to return. -image = '{MY-IMAGE}' - +image = '' # TODO: Update placeholder value. -# Perform the call response = service.get_image(project, image) # TODO: Change code below to process the `response` object: @@ -3096,34 +2696,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_image_from_family` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the image family to search for. -family = '{MY-FAMILY}' - +family = '' # TODO: Update placeholder value. -# Perform the call response = service.get_image_from_family(project, family) # TODO: Change code below to process the `response` object: @@ -3135,35 +2730,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_image` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Image.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_image(project, request_body) # TODO: Change code below to process the `response` object: @@ -3175,31 +2764,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_images` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_images(project, page_token: token) end @@ -3215,41 +2799,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `abandon_instance_group_manager_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupManagersAbandonInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.abandon_instance_group_manager_instances(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: @@ -3261,38 +2839,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_instance_group_managers` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_instance_group_managers(project, page_token: token) end items.each do |name, instance_group_managers_scoped_list| # TODO: Change code below to process each (name, instance_group_managers_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(instance_group_managers_scoped_list) + puts String(name << " => " << JSON.pretty_generate(instance_group_managers_scoped_list) end # BEFORE RUNNING: # --------------- @@ -3301,37 +2874,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance_group_manager` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group to delete. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_instance_group_manager(project, zone, instance_group_manager) # TODO: Change code below to process the `response` object: @@ -3343,41 +2911,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance_group_manager_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupManagersDeleteInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.delete_instance_group_manager_instances(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: @@ -3389,37 +2951,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_instance_group_manager` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' +instance_group_manager = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_instance_group_manager(project, zone, instance_group_manager) # TODO: Change code below to process the `response` object: @@ -3431,38 +2988,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_instance_group_manager` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where you want to create the managed instance group. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupManager.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_instance_group_manager(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -3474,34 +3025,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_instance_group_managers` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instance_group_managers(project, zone, page_token: token) end @@ -3517,37 +3063,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_instance_group_manager_managed_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. -# Perform the call response = service.list_instance_group_manager_managed_instances(project, zone, instance_group_manager) # TODO: Change code below to process the `response` object: @@ -3559,41 +3100,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `recreate_instance_group_manager_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupManagersRecreateInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.recreate_instance_group_manager_instances(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: @@ -3605,42 +3140,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `resize_instance_group_manager` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' +instance_group_manager = '' # TODO: Update placeholder value. # The number of running instances that the managed instance group should maintain at any given time. # The group automatically adds or removes instances to maintain the number of instances specified by # this parameter. -size = 0 +size = 0 # TODO: Update placeholder value. - -# Perform the call response = service.resize_instance_group_manager(project, zone, instance_group_manager, size) # TODO: Change code below to process the `response` object: @@ -3652,41 +3182,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_group_manager_instance_template` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupManagersSetInstanceTemplateRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_group_manager_instance_template(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: @@ -3698,41 +3222,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_group_manager_target_pools` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the managed instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the managed instance group. -instance_group_manager = '{MY-INSTANCE-GROUP-MANAGER}' - +instance_group_manager = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupManagersSetTargetPoolsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_group_manager_target_pools(project, zone, instance_group_manager, request_body) # TODO: Change code below to process the `response` object: @@ -3744,41 +3262,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `add_instance_group_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the instance group where you are adding instances. -instance_group = '{MY-INSTANCE-GROUP}' - +instance_group = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupsAddInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.add_instance_group_instances(project, zone, instance_group, request_body) # TODO: Change code below to process the `response` object: @@ -3790,38 +3302,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_instance_groups` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_instance_groups(project, page_token: token) end items.each do |name, instance_groups_scoped_list| # TODO: Change code below to process each (name, instance_groups_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(instance_groups_scoped_list) + puts String(name << " => " << JSON.pretty_generate(instance_groups_scoped_list) end # BEFORE RUNNING: # --------------- @@ -3830,37 +3337,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance_group` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the instance group to delete. -instance_group = '{MY-INSTANCE-GROUP}' - +instance_group = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_instance_group(project, zone, instance_group) # TODO: Change code below to process the `response` object: @@ -3872,37 +3374,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_instance_group` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the instance group. -instance_group = '{MY-INSTANCE-GROUP}' - +instance_group = '' # TODO: Update placeholder value. -# Perform the call response = service.get_instance_group(project, zone, instance_group) # TODO: Change code below to process the `response` object: @@ -3914,38 +3411,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_instance_group` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where you want to create the instance group. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_instance_group(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -3957,34 +3448,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_instance_groups` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instance_groups(project, zone, page_token: token) end @@ -4000,41 +3486,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_instance_group_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the instance group from which you want to generate a list of included instances. -instance_group = '{MY-INSTANCE-GROUP}' - +instance_group = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupsListInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instance_group_instances(project, zone, instance_group, request_body, page_token: token) end @@ -4050,41 +3530,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `remove_instance_group_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the instance group where the specified instances will be removed. -instance_group = '{MY-INSTANCE-GROUP}' - +instance_group = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupsRemoveInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.remove_instance_group_instances(project, zone, instance_group, request_body) # TODO: Change code below to process the `response` object: @@ -4096,41 +3570,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_group_named_ports` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone where the instance group is located. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the instance group where the named ports are updated. -instance_group = '{MY-INSTANCE-GROUP}' - +instance_group = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceGroupsSetNamedPortsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_group_named_ports(project, zone, instance_group, request_body) # TODO: Change code below to process the `response` object: @@ -4142,34 +3610,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance_template` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the instance template to delete. -instance_template = '{MY-INSTANCE-TEMPLATE}' - +instance_template = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_instance_template(project, instance_template) # TODO: Change code below to process the `response` object: @@ -4181,34 +3644,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_instance_template` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the instance template. -instance_template = '{MY-INSTANCE-TEMPLATE}' - +instance_template = '' # TODO: Update placeholder value. -# Perform the call response = service.get_instance_template(project, instance_template) # TODO: Change code below to process the `response` object: @@ -4220,35 +3678,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_instance_template` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceTemplate.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_instance_template(project, request_body) # TODO: Change code below to process the `response` object: @@ -4260,31 +3712,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_instance_templates` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instance_templates(project, page_token: token) end @@ -4300,44 +3747,38 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `add_instance_access_config` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The instance name for this request. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # The name of the network interface to add to this instance. -network_interface = '{MY-NETWORK-INTERFACE}' - +network_interface = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::AccessConfig.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.add_instance_access_config(project, zone, instance, network_interface, request_body) # TODO: Change code below to process the `response` object: @@ -4349,38 +3790,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_instances(project, page_token: token) end items.each do |name, instances_scoped_list| # TODO: Change code below to process each (name, instances_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(instances_scoped_list) + puts String(name << " => " << JSON.pretty_generate(instances_scoped_list) end # BEFORE RUNNING: # --------------- @@ -4389,41 +3825,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `attach_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The instance name for this request. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::AttachedDisk.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.attach_disk(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: @@ -4435,37 +3865,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance resource to delete. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_instance(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -4477,43 +3902,38 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance_access_config` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The instance name for this request. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # The name of the access config to delete. -access_config = '{MY-ACCESS-CONFIG}' +access_config = '' # TODO: Update placeholder value. # The name of the network interface. -network_interface = '{MY-NETWORK-INTERFACE}' +network_interface = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_instance_access_config(project, zone, instance, access_config, network_interface) # TODO: Change code below to process the `response` object: @@ -4525,40 +3945,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `detach_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Instance name. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Disk device name to detach. -device_name = '{MY-DEVICE-NAME}' +device_name = '' # TODO: Update placeholder value. - -# Perform the call response = service.detach_disk(project, zone, instance, device_name) # TODO: Change code below to process the `response` object: @@ -4570,37 +3985,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance resource to return. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_instance(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -4612,37 +4022,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_instance_serial_port_output` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance scoping this request. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_instance_serial_port_output(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -4654,38 +4059,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Instance.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_instance(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -4697,34 +4096,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instances(project, zone, page_token: token) end @@ -4740,37 +4134,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `reset_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance scoping this request. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.reset_instance(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -4782,43 +4171,38 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_disk_auto_delete` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # The instance name. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Whether to auto-delete the disk when the instance is deleted. -auto_delete = false +auto_delete = false # TODO: Update placeholder value. # The device name of the disk to modify. -device_name = '{MY-DEVICE-NAME}' - +device_name = '' # TODO: Update placeholder value. -# Perform the call response = service.set_disk_auto_delete(project, zone, instance, auto_delete, device_name) # TODO: Change code below to process the `response` object: @@ -4830,41 +4214,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_machine_type` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance scoping this request. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstancesSetMachineTypeRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_machine_type(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: @@ -4876,41 +4254,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_metadata` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance scoping this request. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Metadata.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_metadata(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: @@ -4922,41 +4294,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_scheduling` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Instance name. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Scheduling.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_scheduling(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: @@ -4968,41 +4334,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_instance_tags` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance scoping this request. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Tags.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_instance_tags(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: @@ -5014,37 +4374,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `start_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance resource to start. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.start_instance(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -5056,41 +4411,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `start_instance_with_encryption_key` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance resource to start. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstancesStartWithEncryptionKeyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.start_instance_with_encryption_key(project, zone, instance, request_body) # TODO: Change code below to process the `response` object: @@ -5102,37 +4451,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `stop_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the instance resource to stop. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.stop_instance(project, zone, instance) # TODO: Change code below to process the `response` object: @@ -5144,34 +4488,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_license` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the License resource to return. -license = '{MY-LICENSE}' +license = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_license(project, license) # TODO: Change code below to process the `response` object: @@ -5183,38 +4522,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_machine_types` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_machine_types(project, page_token: token) end items.each do |name, machine_types_scoped_list| # TODO: Change code below to process each (name, machine_types_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(machine_types_scoped_list) + puts String(name << " => " << JSON.pretty_generate(machine_types_scoped_list) end # BEFORE RUNNING: # --------------- @@ -5223,37 +4557,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_machine_type` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the machine type to return. -machine_type = '{MY-MACHINE-TYPE}' +machine_type = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_machine_type(project, zone, machine_type) # TODO: Change code below to process the `response` object: @@ -5265,34 +4594,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_machine_types` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_machine_types(project, zone, page_token: token) end @@ -5308,34 +4632,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_network` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the network to delete. -network = '{MY-NETWORK}' - +network = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_network(project, network) # TODO: Change code below to process the `response` object: @@ -5347,34 +4666,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_network` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the network to return. -network = '{MY-NETWORK}' - +network = '' # TODO: Update placeholder value. -# Perform the call response = service.get_network(project, network) # TODO: Change code below to process the `response` object: @@ -5386,35 +4700,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_network` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Network.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_network(project, request_body) # TODO: Change code below to process the `response` object: @@ -5426,31 +4734,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_networks` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_networks(project, page_token: token) end @@ -5466,31 +4769,26 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_project` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_project(project) # TODO: Change code below to process the `response` object: @@ -5502,35 +4800,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `move_disk` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::MoveDiskRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.move_disk(project, request_body) # TODO: Change code below to process the `response` object: @@ -5542,35 +4834,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `move_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::MoveInstanceRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.move_instance(project, request_body) # TODO: Change code below to process the `response` object: @@ -5582,35 +4868,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `set_common_instance_metadata` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Metadata.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_common_instance_metadata(project, request_body) # TODO: Change code below to process the `response` object: @@ -5622,35 +4902,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `set_usage_export_bucket` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::UsageExportLocation.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_usage_export_bucket(project, request_body) # TODO: Change code below to process the `response` object: @@ -5662,37 +4936,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_region_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Operations resource to delete. -operation = '{MY-OPERATION}' +operation = '' # TODO: Update placeholder value. - -# Perform the call service.delete_region_operation(project, region, operation) # BEFORE RUNNING: # --------------- @@ -5701,37 +4969,32 @@ service.delete_region_operation(project, region, operation) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_region_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Operations resource to return. -operation = '{MY-OPERATION}' +operation = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_region_operation(project, region, operation) # TODO: Change code below to process the `response` object: @@ -5743,34 +5006,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_region_operations` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_region_operations(project, region, page_token: token) end @@ -5786,34 +5044,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_region` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region resource to return. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_region(project, region) # TODO: Change code below to process the `response` object: @@ -5825,31 +5078,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_regions` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_regions(project, page_token: token) end @@ -5865,38 +5113,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `aggregated_router_list` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.aggregated_router_list(project, page_token: token) end items.each do |name, routers_scoped_list| # TODO: Change code below to process each (name, routers_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(routers_scoped_list) + puts String(name << " => " << JSON.pretty_generate(routers_scoped_list) end # BEFORE RUNNING: # --------------- @@ -5905,37 +5148,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_router` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Router resource to delete. -router = '{MY-ROUTER}' +router = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_router(project, region, router) # TODO: Change code below to process the `response` object: @@ -5947,37 +5185,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_router` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Router resource to return. -router = '{MY-ROUTER}' - +router = '' # TODO: Update placeholder value. -# Perform the call response = service.get_router(project, region, router) # TODO: Change code below to process the `response` object: @@ -5989,37 +5222,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_router_router_status` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Router resource to query. -router = '{MY-ROUTER}' - +router = '' # TODO: Update placeholder value. -# Perform the call response = service.get_router_router_status(project, region, router) # TODO: Change code below to process the `response` object: @@ -6031,38 +5259,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_router` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Router.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_router(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -6074,34 +5296,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_routers` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_routers(project, region, page_token: token) end @@ -6117,41 +5334,36 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_router` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Router resource to update. -router = '{MY-ROUTER}' - +router = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::Router.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_router(project, region, router, request_body) # TODO: Change code below to process the `response` object: @@ -6163,41 +5375,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `preview_router` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Router resource to query. -router = '{MY-ROUTER}' - +router = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Router.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.preview_router(project, region, router, request_body) # TODO: Change code below to process the `response` object: @@ -6209,41 +5415,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_router` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Router resource to update. -router = '{MY-ROUTER}' - +router = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Router.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_router(project, region, router, request_body) # TODO: Change code below to process the `response` object: @@ -6255,34 +5455,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_route` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Route resource to delete. -route = '{MY-ROUTE}' +route = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_route(project, route) # TODO: Change code below to process the `response` object: @@ -6294,34 +5489,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_route` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Route resource to return. -route = '{MY-ROUTE}' +route = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_route(project, route) # TODO: Change code below to process the `response` object: @@ -6333,35 +5523,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_route` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Route.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_route(project, request_body) # TODO: Change code below to process the `response` object: @@ -6373,31 +5557,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_routes` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_routes(project, page_token: token) end @@ -6413,34 +5592,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_snapshot` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Snapshot resource to delete. -snapshot = '{MY-SNAPSHOT}' +snapshot = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_snapshot(project, snapshot) # TODO: Change code below to process the `response` object: @@ -6452,34 +5626,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_snapshot` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the Snapshot resource to return. -snapshot = '{MY-SNAPSHOT}' - +snapshot = '' # TODO: Update placeholder value. -# Perform the call response = service.get_snapshot(project, snapshot) # TODO: Change code below to process the `response` object: @@ -6491,31 +5660,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_snapshots` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_snapshots(project, page_token: token) end @@ -6531,34 +5695,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_ssl_certificate` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the SslCertificate resource to delete. -ssl_certificate = '{MY-SSL-CERTIFICATE}' +ssl_certificate = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_ssl_certificate(project, ssl_certificate) # TODO: Change code below to process the `response` object: @@ -6570,34 +5729,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_ssl_certificate` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the SslCertificate resource to return. -ssl_certificate = '{MY-SSL-CERTIFICATE}' +ssl_certificate = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_ssl_certificate(project, ssl_certificate) # TODO: Change code below to process the `response` object: @@ -6609,35 +5763,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_ssl_certificate` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::SslCertificate.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_ssl_certificate(project, request_body) # TODO: Change code below to process the `response` object: @@ -6649,31 +5797,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_ssl_certificates` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_ssl_certificates(project, page_token: token) end @@ -6689,38 +5832,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `aggregated_subnetwork_list` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.aggregated_subnetwork_list(project, page_token: token) end items.each do |name, subnetworks_scoped_list| # TODO: Change code below to process each (name, subnetworks_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(subnetworks_scoped_list) + puts String(name << " => " << JSON.pretty_generate(subnetworks_scoped_list) end # BEFORE RUNNING: # --------------- @@ -6729,37 +5867,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_subnetwork` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Subnetwork resource to delete. -subnetwork = '{MY-SUBNETWORK}' - +subnetwork = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_subnetwork(project, region, subnetwork) # TODO: Change code below to process the `response` object: @@ -6771,37 +5904,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_subnetwork` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the Subnetwork resource to return. -subnetwork = '{MY-SUBNETWORK}' - +subnetwork = '' # TODO: Update placeholder value. -# Perform the call response = service.get_subnetwork(project, region, subnetwork) # TODO: Change code below to process the `response` object: @@ -6813,38 +5941,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_subnetwork` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::Subnetwork.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_subnetwork(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -6856,34 +5978,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_subnetworks` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_subnetworks(project, region, page_token: token) end @@ -6899,34 +6016,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_target_http_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpProxy resource to delete. -target_http_proxy = '{MY-TARGET-HTTP-PROXY}' - +target_http_proxy = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_target_http_proxy(project, target_http_proxy) # TODO: Change code below to process the `response` object: @@ -6938,34 +6050,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_http_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpProxy resource to return. -target_http_proxy = '{MY-TARGET-HTTP-PROXY}' +target_http_proxy = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_target_http_proxy(project, target_http_proxy) # TODO: Change code below to process the `response` object: @@ -6977,35 +6084,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_target_http_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetHttpProxy.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_target_http_proxy(project, request_body) # TODO: Change code below to process the `response` object: @@ -7017,31 +6118,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_target_http_proxies` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_target_http_proxies(project, page_token: token) end @@ -7057,38 +6153,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_http_proxy_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpProxy to set a URL map for. -target_http_proxy = '{MY-TARGET-HTTP-PROXY}' - +target_http_proxy = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::UrlMapReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_http_proxy_url_map(project, target_http_proxy, request_body) # TODO: Change code below to process the `response` object: @@ -7100,34 +6190,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_target_https_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpsProxy resource to delete. -target_https_proxy = '{MY-TARGET-HTTPS-PROXY}' +target_https_proxy = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_target_https_proxy(project, target_https_proxy) # TODO: Change code below to process the `response` object: @@ -7139,34 +6224,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_https_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpsProxy resource to return. -target_https_proxy = '{MY-TARGET-HTTPS-PROXY}' +target_https_proxy = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_target_https_proxy(project, target_https_proxy) # TODO: Change code below to process the `response` object: @@ -7178,35 +6258,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_target_https_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetHttpsProxy.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_target_https_proxy(project, request_body) # TODO: Change code below to process the `response` object: @@ -7218,31 +6292,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_target_https_proxies` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_target_https_proxies(project, page_token: token) end @@ -7258,38 +6327,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_https_proxy_ssl_certificates` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpsProxy resource to set an SslCertificates resource for. -target_https_proxy = '{MY-TARGET-HTTPS-PROXY}' - +target_https_proxy = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetHttpsProxiesSetSslCertificatesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_https_proxy_ssl_certificates(project, target_https_proxy, request_body) # TODO: Change code below to process the `response` object: @@ -7301,38 +6364,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_https_proxy_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetHttpsProxy resource whose URL map is to be set. -target_https_proxy = '{MY-TARGET-HTTPS-PROXY}' - +target_https_proxy = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::UrlMapReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_https_proxy_url_map(project, target_https_proxy, request_body) # TODO: Change code below to process the `response` object: @@ -7344,38 +6401,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_target_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_target_instance(project, page_token: token) end items.each do |name, target_instances_scoped_list| # TODO: Change code below to process each (name, target_instances_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(target_instances_scoped_list) + puts String(name << " => " << JSON.pretty_generate(target_instances_scoped_list) end # BEFORE RUNNING: # --------------- @@ -7384,37 +6436,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_target_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone scoping this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the TargetInstance resource to delete. -target_instance = '{MY-TARGET-INSTANCE}' +target_instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_target_instance(project, zone, target_instance) # TODO: Change code below to process the `response` object: @@ -7426,37 +6473,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone scoping this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the TargetInstance resource to return. -target_instance = '{MY-TARGET-INSTANCE}' +target_instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_target_instance(project, zone, target_instance) # TODO: Change code below to process the `response` object: @@ -7468,38 +6510,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_target_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone scoping this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetInstance.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_target_instance(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -7511,34 +6547,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_target_instances` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone scoping this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_target_instances(project, zone, page_token: token) end @@ -7554,41 +6585,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `add_target_pool_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the target pool to add a health check to. -target_pool = '{MY-TARGET-POOL}' - +target_pool = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::AddTargetPoolsHealthCheckRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.add_target_pool_health_check(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: @@ -7600,41 +6625,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `add_target_pool_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the TargetPool resource to add instances to. -target_pool = '{MY-TARGET-POOL}' - +target_pool = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::AddTargetPoolsInstanceRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.add_target_pool_instance(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: @@ -7646,38 +6665,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_target_pools` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_target_pools(project, page_token: token) end items.each do |name, target_pools_scoped_list| # TODO: Change code below to process each (name, target_pools_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(target_pools_scoped_list) + puts String(name << " => " << JSON.pretty_generate(target_pools_scoped_list) end # BEFORE RUNNING: # --------------- @@ -7686,37 +6700,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_target_pool` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the TargetPool resource to delete. -target_pool = '{MY-TARGET-POOL}' +target_pool = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_target_pool(project, region, target_pool) # TODO: Change code below to process the `response` object: @@ -7728,37 +6737,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_pool` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the TargetPool resource to return. -target_pool = '{MY-TARGET-POOL}' +target_pool = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_target_pool(project, region, target_pool) # TODO: Change code below to process the `response` object: @@ -7770,41 +6774,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_pool_health` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the TargetPool resource to which the queried instance belongs. -target_pool = '{MY-TARGET-POOL}' - +target_pool = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::InstanceReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.get_target_pool_health(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: @@ -7816,38 +6814,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_target_pool` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetPool.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_target_pool(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -7859,34 +6851,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_target_pools` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_target_pools(project, region, page_token: token) end @@ -7902,41 +6889,35 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `remove_target_pool_health_check` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the target pool to remove health checks from. -target_pool = '{MY-TARGET-POOL}' - +target_pool = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::RemoveTargetPoolsHealthCheckRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.remove_target_pool_health_check(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: @@ -7948,41 +6929,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `remove_target_pool_instance` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the TargetPool resource to remove instances from. -target_pool = '{MY-TARGET-POOL}' - +target_pool = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::RemoveTargetPoolsInstanceRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.remove_target_pool_instance(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: @@ -7994,41 +6969,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_pool_backup` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region scoping this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the TargetPool resource to set a backup pool for. -target_pool = '{MY-TARGET-POOL}' - +target_pool = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetReference.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_pool_backup(project, region, target_pool, request_body) # TODO: Change code below to process the `response` object: @@ -8040,34 +7009,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_target_ssl_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetSslProxy resource to delete. -target_ssl_proxy = '{MY-TARGET-SSL-PROXY}' - +target_ssl_proxy = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_target_ssl_proxy(project, target_ssl_proxy) # TODO: Change code below to process the `response` object: @@ -8079,34 +7043,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_ssl_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetSslProxy resource to return. -target_ssl_proxy = '{MY-TARGET-SSL-PROXY}' - +target_ssl_proxy = '' # TODO: Update placeholder value. -# Perform the call response = service.get_target_ssl_proxy(project, target_ssl_proxy) # TODO: Change code below to process the `response` object: @@ -8118,35 +7077,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_target_ssl_proxy` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetSslProxy.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_target_ssl_proxy(project, request_body) # TODO: Change code below to process the `response` object: @@ -8158,31 +7111,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_target_ssl_proxies` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_target_ssl_proxies(project, page_token: token) end @@ -8198,38 +7146,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_ssl_proxy_backend_service` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetSslProxy resource whose BackendService resource is to be set. -target_ssl_proxy = '{MY-TARGET-SSL-PROXY}' - +target_ssl_proxy = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetSslProxiesSetBackendServiceRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_ssl_proxy_backend_service(project, target_ssl_proxy, request_body) # TODO: Change code below to process the `response` object: @@ -8241,38 +7183,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_ssl_proxy_proxy_header` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetSslProxy resource whose ProxyHeader is to be set. -target_ssl_proxy = '{MY-TARGET-SSL-PROXY}' - +target_ssl_proxy = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetSslProxiesSetProxyHeaderRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_ssl_proxy_proxy_header(project, target_ssl_proxy, request_body) # TODO: Change code below to process the `response` object: @@ -8284,38 +7220,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_target_ssl_proxy_ssl_certificates` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the TargetSslProxy resource whose SslCertificate resource is to be set. -target_ssl_proxy = '{MY-TARGET-SSL-PROXY}' - +target_ssl_proxy = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetSslProxiesSetSslCertificatesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_target_ssl_proxy_ssl_certificates(project, target_ssl_proxy, request_body) # TODO: Change code below to process the `response` object: @@ -8327,38 +7257,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_target_vpn_gateways` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_target_vpn_gateways(project, page_token: token) end items.each do |name, target_vpn_gateways_scoped_list| # TODO: Change code below to process each (name, target_vpn_gateways_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(target_vpn_gateways_scoped_list) + puts String(name << " => " << JSON.pretty_generate(target_vpn_gateways_scoped_list) end # BEFORE RUNNING: # --------------- @@ -8367,37 +7292,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_target_vpn_gateway` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the target VPN gateway to delete. -target_vpn_gateway = '{MY-TARGET-VPN-GATEWAY}' - +target_vpn_gateway = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_target_vpn_gateway(project, region, target_vpn_gateway) # TODO: Change code below to process the `response` object: @@ -8409,37 +7329,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_target_vpn_gateway` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the target VPN gateway to return. -target_vpn_gateway = '{MY-TARGET-VPN-GATEWAY}' - +target_vpn_gateway = '' # TODO: Update placeholder value. -# Perform the call response = service.get_target_vpn_gateway(project, region, target_vpn_gateway) # TODO: Change code below to process the `response` object: @@ -8451,38 +7366,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_target_vpn_gateway` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::TargetVpnGateway.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_target_vpn_gateway(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -8494,34 +7403,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_target_vpn_gateways` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_target_vpn_gateways(project, region, page_token: token) end @@ -8537,34 +7441,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the UrlMap resource to delete. -url_map = '{MY-URL-MAP}' - +url_map = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_url_map(project, url_map) # TODO: Change code below to process the `response` object: @@ -8576,34 +7475,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the UrlMap resource to return. -url_map = '{MY-URL-MAP}' +url_map = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_url_map(project, url_map) # TODO: Change code below to process the `response` object: @@ -8615,35 +7509,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::UrlMap.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_url_map(project, request_body) # TODO: Change code below to process the `response` object: @@ -8655,38 +7543,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `invalidate_url_map_cache` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the UrlMap scoping this request. -url_map = '{MY-URL-MAP}' - +url_map = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::CacheInvalidationRule.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.invalidate_url_map_cache(project, url_map, request_body) # TODO: Change code below to process the `response` object: @@ -8698,31 +7580,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_url_maps` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_url_maps(project, page_token: token) end @@ -8738,38 +7615,33 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the UrlMap resource to update. -url_map = '{MY-URL-MAP}' - +url_map = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::ComputeV1::UrlMap.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_url_map(project, url_map, request_body) # TODO: Change code below to process the `response` object: @@ -8781,38 +7653,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the UrlMap resource to update. -url_map = '{MY-URL-MAP}' - +url_map = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::UrlMap.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_url_map(project, url_map, request_body) # TODO: Change code below to process the `response` object: @@ -8824,38 +7690,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `validate_url_map` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the UrlMap resource to be validated as. -url_map = '{MY-URL-MAP}' - +url_map = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::ValidateUrlMapsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.validate_url_map(project, url_map, request_body) # TODO: Change code below to process the `response` object: @@ -8867,38 +7727,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_aggregated_vpn_tunnel` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_aggregated_vpn_tunnel(project, page_token: token) end items.each do |name, vpn_tunnels_scoped_list| # TODO: Change code below to process each (name, vpn_tunnels_scoped_list) pair: - puts String(name) << " => " << JSON.pretty_generate(vpn_tunnels_scoped_list) + puts String(name << " => " << JSON.pretty_generate(vpn_tunnels_scoped_list) end # BEFORE RUNNING: # --------------- @@ -8907,37 +7762,32 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_vpn_tunnel` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the VpnTunnel resource to delete. -vpn_tunnel = '{MY-VPN-TUNNEL}' - +vpn_tunnel = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_vpn_tunnel(project, region, vpn_tunnel) # TODO: Change code below to process the `response` object: @@ -8949,37 +7799,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_vpn_tunnel` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' +region = '' # TODO: Update placeholder value. # Name of the VpnTunnel resource to return. -vpn_tunnel = '{MY-VPN-TUNNEL}' - +vpn_tunnel = '' # TODO: Update placeholder value. -# Perform the call response = service.get_vpn_tunnel(project, region, vpn_tunnel) # TODO: Change code below to process the `response` object: @@ -8991,38 +7836,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_vpn_tunnel` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ComputeV1::VpnTunnel.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_vpn_tunnel(project, region, request_body) # TODO: Change code below to process the `response` object: @@ -9034,34 +7873,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_vpn_tunnels` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the region for this request. -region = '{MY-REGION}' - +region = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_vpn_tunnels(project, region, page_token: token) end @@ -9077,37 +7911,31 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' -require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_zone_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the Operations resource to delete. -operation = '{MY-OPERATION}' +operation = '' # TODO: Update placeholder value. - -# Perform the call service.delete_zone_operation(project, zone, operation) # BEFORE RUNNING: # --------------- @@ -9116,37 +7944,32 @@ service.delete_zone_operation(project, zone, operation) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_zone_operation` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for this request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. # Name of the Operations resource to return. -operation = '{MY-OPERATION}' - +operation = '' # TODO: Update placeholder value. -# Perform the call response = service.get_zone_operation(project, zone, operation) # TODO: Change code below to process the `response` object: @@ -9158,34 +7981,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_zone_operations` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone for request. -zone = '{MY-ZONE}' # ex: 'us-central1-f' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_zone_operations(project, zone, page_token: token) end @@ -9201,34 +8019,29 @@ end # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_zone` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone resource to return. -zone = '{MY-ZONE}' # ex: 'us-central1-f' +zone = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_zone(project, zone) # TODO: Change code below to process the `response` object: @@ -9240,31 +8053,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/compute # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/compute_v1' require 'json' service = Google::Apis::ComputeV1::ComputeService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_zones` method: - # Project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_zones(project, page_token: token) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline index 0bd11e023b..19fed29fbb 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_container.v1.json.baseline @@ -6,40 +6,34 @@ # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `create_cluster` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ContainerV1::CreateClusterRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_cluster(project_id, zone, request_body) # TODO: Change code below to process the `response` object: @@ -51,39 +45,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_zone_cluster` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster to delete. -cluster_id = '{MY-CLUSTER-ID}' - +cluster_id = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_zone_cluster(project_id, zone, cluster_id) # TODO: Change code below to process the `response` object: @@ -95,39 +84,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_zone_cluster` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster to retrieve. -cluster_id = '{MY-CLUSTER-ID}' - +cluster_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_zone_cluster(project_id, zone, cluster_id) # TODO: Change code below to process the `response` object: @@ -139,36 +123,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_zone_clusters` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides, or "-" for all zones. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. -# Perform the call response = service.list_zone_clusters(project_id, zone) # TODO: Change code below to process the `response` object: @@ -180,43 +159,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `create_node_pool` method: - # The Google Developers Console [project ID or project number] # (https://developers.google.com/console/help/new/#projectnumber). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster. -cluster_id = '{MY-CLUSTER-ID}' - +cluster_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ContainerV1::CreateNodePoolRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_node_pool(project_id, zone, cluster_id, request_body) # TODO: Change code below to process the `response` object: @@ -228,42 +201,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_project_zone_cluster_node_pool` method: - # The Google Developers Console [project ID or project number] # (https://developers.google.com/console/help/new/#projectnumber). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster. -cluster_id = '{MY-CLUSTER-ID}' +cluster_id = '' # TODO: Update placeholder value. # The name of the node pool to delete. -node_pool_id = '{MY-NODE-POOL-ID}' - +node_pool_id = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id) # TODO: Change code below to process the `response` object: @@ -275,42 +243,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_project_zone_cluster_node_pool` method: - # The Google Developers Console [project ID or project number] # (https://developers.google.com/console/help/new/#projectnumber). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster. -cluster_id = '{MY-CLUSTER-ID}' +cluster_id = '' # TODO: Update placeholder value. # The name of the node pool. -node_pool_id = '{MY-NODE-POOL-ID}' - +node_pool_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_project_zone_cluster_node_pool(project_id, zone, cluster_id, node_pool_id) # TODO: Change code below to process the `response` object: @@ -322,39 +285,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_project_zone_cluster_node_pools` method: - # The Google Developers Console [project ID or project number] # (https://developers.google.com/console/help/new/#projectnumber). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster. -cluster_id = '{MY-CLUSTER-ID}' +cluster_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_project_zone_cluster_node_pools(project_id, zone, cluster_id) # TODO: Change code below to process the `response` object: @@ -366,43 +324,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_cluster` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the cluster to upgrade. -cluster_id = '{MY-CLUSTER-ID}' - +cluster_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ContainerV1::UpdateClusterRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_cluster(project_id, zone, cluster_id, request_body) # TODO: Change code below to process the `response` object: @@ -414,36 +366,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_project_zone_serverconfig` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations # for. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_project_zone_serverconfig(project_id, zone) # TODO: Change code below to process the `response` object: @@ -455,39 +402,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_zone_operation` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) in which the cluster # resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The server-assigned `name` of the operation. -operation_id = '{MY-OPERATION-ID}' - +operation_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_zone_operation(project_id, zone, operation_id) # TODO: Change code below to process the `response` object: @@ -499,36 +441,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/container # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/container_v1' require 'json' service = Google::Apis::ContainerV1::ContainerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_zone_operations` method: - # The Google Developers Console [project ID or project number] # (https://support.google.com/cloud/answer/6158840). -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The name of the Google Compute Engine [zone](/compute/docs/zones#available) to return operations # for, or `-` for all zones. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. -# Perform the call response = service.list_zone_operations(project_id, zone) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dataflow.v1b3.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dataflow.v1b3.json.baseline index 7dc824ed72..20187444ac 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dataflow.v1b3.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dataflow.v1b3.json.baseline @@ -6,35 +6,29 @@ # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_project_job` method: - # The project which owns the job. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::Job.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_project_job(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -46,38 +40,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_project_job_debug_config` method: - # The project id. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The job id. -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::GetDebugConfigRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.get_project_job_debug_config(project_id, job_id, request_body) # TODO: Change code below to process the `response` object: @@ -89,38 +77,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `send_project_job_debug_capture` method: - # The project id. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The job id. -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::SendDebugCaptureRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.send_project_job_debug_capture(project_id, job_id, request_body) # TODO: Change code below to process the `response` object: @@ -132,34 +114,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_project_job` method: - # The project which owns the job. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Identifies a single job. -job_id = '{MY-JOB-ID}' +job_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_project_job(project_id, job_id) # TODO: Change code below to process the `response` object: @@ -171,34 +148,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_project_job_metrics` method: - # A project id. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The job to get messages for. -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_project_job_metrics(project_id, job_id) # TODO: Change code below to process the `response` object: @@ -210,31 +182,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_project_jobs` method: - # The project which owns the jobs. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. -# Perform the call jobs = service.fetch_all(items: :jobs) do |token| service.list_project_jobs(project_id, page_token: token) end @@ -250,39 +217,34 @@ end # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_project_job_messages` method: - # A project id. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The job to get messages about. -job_id = '{MY-JOB-ID}' +job_id = '' # TODO: Update placeholder value. - -# Perform the call -jobMessages = service.fetch_all(items: :jobMessages) do |token| +job_messages = service.fetch_all(items: :job_messages) do |token| service.list_project_job_messages(project_id, job_id, page_token: token) end -jobMessages.each do |job_message| +job_messages.each do |job_message| # TODO: Change code below to process each `job_message` resource: puts JSON.pretty_generate(job_message) end @@ -293,38 +255,32 @@ end # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_project_job` method: - # The project which owns the job. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Identifies a single job. -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::Job.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_project_job(project_id, job_id, request_body) # TODO: Change code below to process the `response` object: @@ -336,38 +292,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `lease_work_item` method: - # Identifies the project this worker belongs to. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # Identifies the workflow job this worker belongs to. -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::LeaseWorkItemRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.lease_work_item(project_id, job_id, request_body) # TODO: Change code below to process the `response` object: @@ -379,38 +329,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `report_project_job_work_item_status` method: - # The project which owns the WorkItem's job. -project_id = '{MY-PROJECT-ID}' +project_id = '' # TODO: Update placeholder value. # The job which the WorkItem is part of. -job_id = '{MY-JOB-ID}' - +job_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::ReportWorkItemStatusRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.report_project_job_work_item_status(project_id, job_id, request_body) # TODO: Change code below to process the `response` object: @@ -422,35 +366,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_job_from_template` method: - # The project which owns the job. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::CreateJobFromTemplateRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_job_from_template(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -462,35 +400,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dataflow # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dataflow_v1b3' require 'json' service = Google::Apis::DataflowV1b3::DataflowService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `worker_project_messages` method: - # The project to send the WorkerMessages to. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DataflowV1b3::SendWorkerMessagesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.worker_project_messages(project_id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline index 462efb3098..c856e20786 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_datastore.v1.json.baseline @@ -6,35 +6,29 @@ # https://console.developers.google.com/apis/api/datastore # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/datastore_v1' require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `allocate_project_ids` method: - # The ID of the project against which to make the request. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DatastoreV1::AllocateIdsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.allocate_project_ids(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -46,35 +40,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/datastore # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/datastore_v1' require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `begin_project_transaction` method: - # The ID of the project against which to make the request. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DatastoreV1::BeginTransactionRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.begin_project_transaction(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -86,35 +74,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/datastore # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/datastore_v1' require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `commit_project` method: - # The ID of the project against which to make the request. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DatastoreV1::CommitRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.commit_project(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -126,35 +108,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/datastore # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/datastore_v1' require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `lookup_project` method: - # The ID of the project against which to make the request. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DatastoreV1::LookupRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.lookup_project(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -166,35 +142,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/datastore # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/datastore_v1' require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `rollback_project` method: - # The ID of the project against which to make the request. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DatastoreV1::RollbackRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.rollback_project(project_id, request_body) # TODO: Change code below to process the `response` object: @@ -206,35 +176,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/datastore # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/datastore_v1' require 'json' service = Google::Apis::DatastoreV1::DatastoreService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `run_project_query` method: - # The ID of the project against which to make the request. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DatastoreV1::RunQueryRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.run_project_query(project_id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline index 6e59dbc923..0fc2e6a4ec 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_deploymentmanager.v2.json.baseline @@ -6,38 +6,32 @@ # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `cancel_deployment_preview` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' - +deployment = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DeploymentmanagerV2::DeploymentsCancelPreviewRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.cancel_deployment_preview(project, deployment, request_body) # TODO: Change code below to process the `response` object: @@ -49,34 +43,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_deployment` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' +deployment = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_deployment(project, deployment) # TODO: Change code below to process the `response` object: @@ -88,34 +77,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_deployment` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' - +deployment = '' # TODO: Update placeholder value. -# Perform the call response = service.get_deployment(project, deployment) # TODO: Change code below to process the `response` object: @@ -127,34 +111,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_deployment_iam_policy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the resource for this request. -resource = '{MY-RESOURCE}' - +resource = '' # TODO: Update placeholder value. -# Perform the call response = service.get_deployment_iam_policy(project, resource) # TODO: Change code below to process the `response` object: @@ -166,35 +145,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_deployment` method: - # The project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DeploymentmanagerV2::Deployment.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_deployment(project, request_body) # TODO: Change code below to process the `response` object: @@ -206,31 +179,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_deployments` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call deployments = service.fetch_all(items: :deployments) do |token| service.list_deployments(project, page_token: token) end @@ -246,38 +214,33 @@ end # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_deployment` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' - +deployment = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DeploymentmanagerV2::Deployment.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_deployment(project, deployment, request_body) # TODO: Change code below to process the `response` object: @@ -289,38 +252,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `set_deployment_iam_policy` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the resource for this request. -resource = '{MY-RESOURCE}' - +resource = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DeploymentmanagerV2::Policy.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_deployment_iam_policy(project, resource, request_body) # TODO: Change code below to process the `response` object: @@ -332,38 +289,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `stop_deployment` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' - +deployment = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DeploymentmanagerV2::DeploymentsStopRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.stop_deployment(project, deployment, request_body) # TODO: Change code below to process the `response` object: @@ -375,38 +326,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `test_deployment_iam_permissions` method: - # Project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the resource for this request. -resource = '{MY-RESOURCE}' - +resource = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DeploymentmanagerV2::TestPermissionsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.test_deployment_iam_permissions(project, resource, request_body) # TODO: Change code below to process the `response` object: @@ -418,38 +363,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_deployment` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' - +deployment = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DeploymentmanagerV2::Deployment.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_deployment(project, deployment, request_body) # TODO: Change code below to process the `response` object: @@ -461,37 +400,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_manifest` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' +deployment = '' # TODO: Update placeholder value. # The name of the manifest for this request. -manifest = '{MY-MANIFEST}' - +manifest = '' # TODO: Update placeholder value. -# Perform the call response = service.get_manifest(project, deployment, manifest) # TODO: Change code below to process the `response` object: @@ -503,34 +437,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_manifests` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' +deployment = '' # TODO: Update placeholder value. - -# Perform the call manifests = service.fetch_all(items: :manifests) do |token| service.list_manifests(project, deployment, page_token: token) end @@ -546,34 +475,29 @@ end # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_operation` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the operation for this request. -operation = '{MY-OPERATION}' - +operation = '' # TODO: Update placeholder value. -# Perform the call response = service.get_operation(project, operation) # TODO: Change code below to process the `response` object: @@ -585,31 +509,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_operations` method: - # The project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call operations = service.fetch_all(items: :operations) do |token| service.list_operations(project, page_token: token) end @@ -625,37 +544,32 @@ end # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_resource` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' +deployment = '' # TODO: Update placeholder value. # The name of the resource for this request. -resource = '{MY-RESOURCE}' +resource = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_resource(project, deployment, resource) # TODO: Change code below to process the `response` object: @@ -667,34 +581,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_resources` method: - # The project ID for this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the deployment for this request. -deployment = '{MY-DEPLOYMENT}' - +deployment = '' # TODO: Update placeholder value. -# Perform the call resources = service.fetch_all(items: :resources) do |token| service.list_resources(project, deployment, page_token: token) end @@ -710,31 +619,26 @@ end # https://console.developers.google.com/apis/api/deploymentmanager # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/deploymentmanager_v2' require 'json' service = Google::Apis::DeploymentmanagerV2::DeploymentManagerService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_types` method: - # The project ID for this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call types = service.fetch_all(items: :types) do |token| service.list_types(project, page_token: token) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline index 14d2d00e57..c6a99b9555 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dfareporting.v2.6.json.baseline @@ -5,30 +5,26 @@ # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_account_active_ad_summary` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_account_active_ad_summary` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Account ID. -summary_account_id = '' - +summary_account_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_account_active_ad_summary(profile_id, summary_account_id) # TODO: Change code below to process the `response` object: @@ -39,30 +35,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_account_permission_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_account_permission_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Account permission group ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_account_permission_group(profile_id, id) # TODO: Change code below to process the `response` object: @@ -73,27 +65,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_account_permission_groups` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_account_permission_groups` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_account_permission_groups(profile_id) # TODO: Change code below to process the `response` object: @@ -104,30 +92,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_account_permission` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_account_permission` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Account permission ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_account_permission(profile_id, id) # TODO: Change code below to process the `response` object: @@ -138,27 +122,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_account_permissions` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_account_permissions` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_account_permissions(profile_id) # TODO: Change code below to process the `response` object: @@ -169,30 +149,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_account_user_profile` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_account_user_profile` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User profile ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_account_user_profile(profile_id, id) # TODO: Change code below to process the `response` object: @@ -203,31 +179,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_account_user_profile` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_account_user_profile` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::AccountUserProfile.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_account_user_profile(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -238,32 +209,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_account_user_profiles` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_account_user_profiles` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call -accountUserProfiles = service.fetch_all(items: :accountUserProfiles) do |token| +account_user_profiles = service.fetch_all(items: :account_user_profiles) do |token| service.list_account_user_profiles(profile_id, page_token: token) end -accountUserProfiles.each do |account_user_profile| +account_user_profiles.each do |account_user_profile| # TODO: Change code below to process each `account_user_profile` resource: puts JSON.pretty_generate(account_user_profile) end @@ -273,34 +240,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_account_user_profile` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_account_user_profile` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User profile ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::AccountUserProfile.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_account_user_profile(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -311,31 +274,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_account_user_profile` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_account_user_profile` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::AccountUserProfile.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_account_user_profile(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -346,30 +304,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_account` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_account` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Account ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_account(profile_id, id) # TODO: Change code below to process the `response` object: @@ -380,27 +334,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_accounts` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_accounts` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call accounts = service.fetch_all(items: :accounts) do |token| service.list_accounts(profile_id, page_token: token) end @@ -415,34 +365,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_account` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_account` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Account ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Account.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_account(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -453,31 +399,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_account` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_account` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Account.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_account(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -488,30 +429,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_ad` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_ad` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Ad ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_ad(profile_id, id) # TODO: Change code below to process the `response` object: @@ -522,31 +459,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_ad` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_ad` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Ad.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_ad(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -557,27 +489,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_ads` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_ads` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call ads = service.fetch_all(items: :ads) do |token| service.list_ads(profile_id, page_token: token) end @@ -592,34 +520,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_ad` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_ad` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Ad ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Ad.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_ad(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -630,31 +554,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_ad` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_ad` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Ad.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_ad(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -665,30 +584,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_advertiser_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_advertiser_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Advertiser group ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call service.delete_advertiser_group(profile_id, id) # BEFORE RUNNING: # --------------- @@ -696,30 +610,26 @@ service.delete_advertiser_group(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_advertiser_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_advertiser_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Advertiser group ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_advertiser_group(profile_id, id) # TODO: Change code below to process the `response` object: @@ -730,31 +640,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_advertiser_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_advertiser_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::AdvertiserGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_advertiser_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -765,32 +670,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_advertiser_groups` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_advertiser_groups` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call -advertiserGroups = service.fetch_all(items: :advertiserGroups) do |token| +advertiser_groups = service.fetch_all(items: :advertiser_groups) do |token| service.list_advertiser_groups(profile_id, page_token: token) end -advertiserGroups.each do |advertiser_group| +advertiser_groups.each do |advertiser_group| # TODO: Change code below to process each `advertiser_group` resource: puts JSON.pretty_generate(advertiser_group) end @@ -800,34 +701,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_advertiser_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_advertiser_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Advertiser group ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::AdvertiserGroup.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_advertiser_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -838,31 +735,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_advertiser_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_advertiser_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::AdvertiserGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_advertiser_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -873,30 +765,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_advertiser` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_advertiser` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Advertiser ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_advertiser(profile_id, id) # TODO: Change code below to process the `response` object: @@ -907,31 +795,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_advertiser` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_advertiser` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Advertiser.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_advertiser(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -942,27 +825,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_advertisers` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_advertisers` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call advertisers = service.fetch_all(items: :advertisers) do |token| service.list_advertisers(profile_id, page_token: token) end @@ -977,34 +856,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_advertiser` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_advertiser` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Advertiser ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Advertiser.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_advertiser(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -1015,31 +890,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_advertiser` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_advertiser` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Advertiser.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_advertiser(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -1050,27 +920,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_browsers` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_browsers` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_browsers(profile_id) # TODO: Change code below to process the `response` object: @@ -1081,34 +947,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_campaign_creative_association` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `insert_campaign_creative_association` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Campaign ID in this association. -campaign_id = '' - +campaign_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CampaignCreativeAssociation.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_campaign_creative_association(profile_id, campaign_id, request_body) # TODO: Change code below to process the `response` object: @@ -1119,35 +980,31 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_campaign_creative_associations` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_campaign_creative_associations` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Campaign ID in this association. -campaign_id = '' - +campaign_id = '' # TODO: Update placeholder value. -# Perform the call -campaignCreativeAssociations = service.fetch_all(items: :campaignCreativeAssociations) do |token| +campaign_creative_associations = service.fetch_all(items: :campaign_creative_associations) do |token| service.list_campaign_creative_associations(profile_id, campaign_id, page_token: token) end -campaignCreativeAssociations.each do |campaign_creative_association| +campaign_creative_associations.each do |campaign_creative_association| # TODO: Change code below to process each `campaign_creative_association` resource: puts JSON.pretty_generate(campaign_creative_association) end @@ -1157,30 +1014,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_campaign` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_campaign` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Campaign ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_campaign(profile_id, id) # TODO: Change code below to process the `response` object: @@ -1191,37 +1044,32 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_campaign` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `insert_campaign` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Default landing page name for this new campaign. Must be less than 256 characters long. -default_landing_page_name = '{MY-DEFAULT-LANDING-PAGE-NAME}' +default_landing_page_name = '' # TODO: Update placeholder value. # Default landing page URL for this new campaign. -default_landing_page_url = '{MY-DEFAULT-LANDING-PAGE-URL}' - +default_landing_page_url = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Campaign.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_campaign(profile_id, default_landing_page_name, default_landing_page_url, request_body) # TODO: Change code below to process the `response` object: @@ -1232,27 +1080,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_campaigns` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_campaigns` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call campaigns = service.fetch_all(items: :campaigns) do |token| service.list_campaigns(profile_id, page_token: token) end @@ -1267,34 +1111,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_campaign` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_campaign` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Campaign ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Campaign.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_campaign(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -1305,31 +1145,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_campaign` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_campaign` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Campaign.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_campaign(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -1340,30 +1175,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_change_log` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_change_log` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Change log ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_change_log(profile_id, id) # TODO: Change code below to process the `response` object: @@ -1374,32 +1205,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_change_logs` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_change_logs` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -changeLogs = service.fetch_all(items: :changeLogs) do |token| +change_logs = service.fetch_all(items: :change_logs) do |token| service.list_change_logs(profile_id, page_token: token) end -changeLogs.each do |change_log| +change_logs.each do |change_log| # TODO: Change code below to process each `change_log` resource: puts JSON.pretty_generate(change_log) end @@ -1409,27 +1236,23 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_cities` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_cities` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_cities(profile_id) # TODO: Change code below to process the `response` object: @@ -1440,30 +1263,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_connection_type` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_connection_type` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Connection type ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_connection_type(profile_id, id) # TODO: Change code below to process the `response` object: @@ -1474,27 +1293,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_connection_types` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_connection_types` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_connection_types(profile_id) # TODO: Change code below to process the `response` object: @@ -1505,30 +1320,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_content_category` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_content_category` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Content category ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call service.delete_content_category(profile_id, id) # BEFORE RUNNING: # --------------- @@ -1536,30 +1346,26 @@ service.delete_content_category(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_content_category` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_content_category` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Content category ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_content_category(profile_id, id) # TODO: Change code below to process the `response` object: @@ -1570,31 +1376,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_content_category` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_content_category` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::ContentCategory.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_content_category(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -1605,32 +1406,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_content_categories` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_content_categories` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -contentCategories = service.fetch_all(items: :contentCategories) do |token| +content_categories = service.fetch_all(items: :content_categories) do |token| service.list_content_categories(profile_id, page_token: token) end -contentCategories.each do |content_category| +content_categories.each do |content_category| # TODO: Change code below to process each `content_category` resource: puts JSON.pretty_generate(content_category) end @@ -1640,34 +1437,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_content_category` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_content_category` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Content category ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::ContentCategory.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_content_category(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -1678,31 +1471,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_content_category` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_content_category` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::ContentCategory.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_content_category(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -1713,31 +1501,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `batchinsert_conversion` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/ddmconversions service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `batchinsert_conversion` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::ConversionsBatchInsertRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.batchinsert_conversion(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -1748,30 +1531,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_country` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_country` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Country DART ID. -dart_id = '' - +dart_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_country(profile_id, dart_id) # TODO: Change code below to process the `response` object: @@ -1782,27 +1561,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_countries` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_countries` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_countries(profile_id) # TODO: Change code below to process the `response` object: @@ -1813,39 +1588,33 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_creative_asset` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `insert_creative_asset` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Advertiser ID of this creative. This is a required field. -advertiser_id = '' - +advertiser_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeAssetMetadata.new -# TODO: Assign values to desired members of the `request_body` object. - # TODO: Add desired media content for upload. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.insert_creative_asset(profile_id, advertiser_id, request_body) # TODO: Change code below to process the `response` object: @@ -1856,33 +1625,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_creative_field_value` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_creative_field_value` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative field ID for this creative field value. -creative_field_id = '' +creative_field_id = '' # TODO: Update placeholder value. # Creative Field Value ID -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call service.delete_creative_field_value(profile_id, creative_field_id, id) # BEFORE RUNNING: # --------------- @@ -1890,33 +1654,29 @@ service.delete_creative_field_value(profile_id, creative_field_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_creative_field_value` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_creative_field_value` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative field ID for this creative field value. -creative_field_id = '' +creative_field_id = '' # TODO: Update placeholder value. # Creative Field Value ID -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_creative_field_value(profile_id, creative_field_id, id) # TODO: Change code below to process the `response` object: @@ -1927,34 +1687,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_creative_field_value` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `insert_creative_field_value` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative field ID for this creative field value. -creative_field_id = '' - +creative_field_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeFieldValue.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_creative_field_value(profile_id, creative_field_id, request_body) # TODO: Change code below to process the `response` object: @@ -1965,35 +1720,31 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_creative_field_values` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_creative_field_values` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative field ID for this creative field value. -creative_field_id = '' - +creative_field_id = '' # TODO: Update placeholder value. -# Perform the call -creativeFieldValues = service.fetch_all(items: :creativeFieldValues) do |token| +creative_field_values = service.fetch_all(items: :creative_field_values) do |token| service.list_creative_field_values(profile_id, creative_field_id, page_token: token) end -creativeFieldValues.each do |creative_field_value| +creative_field_values.each do |creative_field_value| # TODO: Change code below to process each `creative_field_value` resource: puts JSON.pretty_generate(creative_field_value) end @@ -2003,37 +1754,33 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_creative_field_value` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_creative_field_value` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative field ID for this creative field value. -creative_field_id = '' +creative_field_id = '' # TODO: Update placeholder value. # Creative Field Value ID -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::CreativeFieldValue.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_creative_field_value(profile_id, creative_field_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -2044,34 +1791,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_creative_field_value` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_creative_field_value` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative field ID for this creative field value. -creative_field_id = '' - +creative_field_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeFieldValue.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_creative_field_value(profile_id, creative_field_id, request_body) # TODO: Change code below to process the `response` object: @@ -2082,30 +1824,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_creative_field` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_creative_field` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative Field ID -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call service.delete_creative_field(profile_id, id) # BEFORE RUNNING: # --------------- @@ -2113,30 +1850,26 @@ service.delete_creative_field(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_creative_field` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_creative_field` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative Field ID -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_creative_field(profile_id, id) # TODO: Change code below to process the `response` object: @@ -2147,31 +1880,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_creative_field` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_creative_field` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeField.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_creative_field(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2182,32 +1910,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_creative_fields` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_creative_fields` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call -creativeFields = service.fetch_all(items: :creativeFields) do |token| +creative_fields = service.fetch_all(items: :creative_fields) do |token| service.list_creative_fields(profile_id, page_token: token) end -creativeFields.each do |creative_field| +creative_fields.each do |creative_field| # TODO: Change code below to process each `creative_field` resource: puts JSON.pretty_generate(creative_field) end @@ -2217,34 +1941,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_creative_field` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_creative_field` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative Field ID -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::CreativeField.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_creative_field(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -2255,31 +1975,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_creative_field` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_creative_field` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeField.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_creative_field(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2290,30 +2005,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_creative_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_creative_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative group ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_creative_group(profile_id, id) # TODO: Change code below to process the `response` object: @@ -2324,31 +2035,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_creative_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_creative_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_creative_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2359,32 +2065,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_creative_groups` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_creative_groups` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -creativeGroups = service.fetch_all(items: :creativeGroups) do |token| +creative_groups = service.fetch_all(items: :creative_groups) do |token| service.list_creative_groups(profile_id, page_token: token) end -creativeGroups.each do |creative_group| +creative_groups.each do |creative_group| # TODO: Change code below to process each `creative_group` resource: puts JSON.pretty_generate(creative_group) end @@ -2394,34 +2096,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_creative_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_creative_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative group ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::CreativeGroup.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_creative_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -2432,31 +2130,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_creative_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_creative_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::CreativeGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_creative_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2467,30 +2160,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_creative` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_creative` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_creative(profile_id, id) # TODO: Change code below to process the `response` object: @@ -2501,31 +2190,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_creative` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_creative` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Creative.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_creative(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2536,27 +2220,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_creatives` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_creatives` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call creatives = service.fetch_all(items: :creatives) do |token| service.list_creatives(profile_id, page_token: token) end @@ -2571,34 +2251,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_creative` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_creative` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Creative ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Creative.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_creative(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -2609,31 +2285,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_creative` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_creative` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Creative.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_creative(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2644,31 +2315,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `query_dimension_value` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `query_dimension_value` method: - # The DFA user profile ID. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::DimensionValueRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.query_dimension_value(profile_id, request_body, page_token: token) end @@ -2683,30 +2349,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_directory_site_contact` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_directory_site_contact` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Directory site contact ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_directory_site_contact(profile_id, id) # TODO: Change code below to process the `response` object: @@ -2717,32 +2379,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_directory_site_contacts` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_directory_site_contacts` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -directorySiteContacts = service.fetch_all(items: :directorySiteContacts) do |token| +directory_site_contacts = service.fetch_all(items: :directory_site_contacts) do |token| service.list_directory_site_contacts(profile_id, page_token: token) end -directorySiteContacts.each do |directory_site_contact| +directory_site_contacts.each do |directory_site_contact| # TODO: Change code below to process each `directory_site_contact` resource: puts JSON.pretty_generate(directory_site_contact) end @@ -2752,30 +2410,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_directory_site` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_directory_site` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Directory site ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_directory_site(profile_id, id) # TODO: Change code below to process the `response` object: @@ -2786,31 +2440,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_directory_site` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_directory_site` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::DirectorySite.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_directory_site(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2821,32 +2470,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_directory_sites` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_directory_sites` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -directorySites = service.fetch_all(items: :directorySites) do |token| +directory_sites = service.fetch_all(items: :directory_sites) do |token| service.list_directory_sites(profile_id, page_token: token) end -directorySites.each do |directory_site| +directory_sites.each do |directory_site| # TODO: Change code below to process each `directory_site` resource: puts JSON.pretty_generate(directory_site) end @@ -2856,37 +2501,32 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_dynamic_targeting_key` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_dynamic_targeting_key` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # ID of the object of this dynamic targeting key. This is a required field. -object_id_ = '' +object_id_ = '' # TODO: Update placeholder value. # Name of this dynamic targeting key. This is a required field. Must be less than 256 characters long # and cannot contain commas. All characters are converted to lowercase. -name = '{MY-NAME}' +name = '' # TODO: Update placeholder value. # Type of the object of this dynamic targeting key. This is a required field. -object_type = '{MY-OBJECT-TYPE}' - +object_type = '' # TODO: Update placeholder value. -# Perform the call service.delete_dynamic_targeting_key(profile_id, object_id_, name, object_type) # BEFORE RUNNING: # --------------- @@ -2894,31 +2534,26 @@ service.delete_dynamic_targeting_key(profile_id, object_id_, name, object_type) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_dynamic_targeting_key` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_dynamic_targeting_key` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::DynamicTargetingKey.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_dynamic_targeting_key(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -2929,27 +2564,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_dynamic_targeting_keys` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_dynamic_targeting_keys` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_dynamic_targeting_keys(profile_id) # TODO: Change code below to process the `response` object: @@ -2960,30 +2591,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_event_tag` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_event_tag` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Event tag ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_event_tag(profile_id, id) # BEFORE RUNNING: # --------------- @@ -2991,30 +2617,26 @@ service.delete_event_tag(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_event_tag` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_event_tag` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Event tag ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_event_tag(profile_id, id) # TODO: Change code below to process the `response` object: @@ -3025,31 +2647,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_event_tag` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking -service.authorization = nil - - -# TODO: Change placeholder below to desired parameter value for the `insert_event_tag` method: +service.authorization = nil # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::EventTag.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_event_tag(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3060,27 +2677,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_event_tags` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_event_tags` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_event_tags(profile_id) # TODO: Change code below to process the `response` object: @@ -3091,34 +2704,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_event_tag` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_event_tag` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Event tag ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::EventTag.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_event_tag(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -3129,31 +2738,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_event_tag` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_event_tag` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::EventTag.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_event_tag(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3164,35 +2768,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_file` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_file` method: - # The ID of the report. -report_id = '' +report_id = '' # TODO: Update placeholder value. # The ID of the report file. -file_id = '' - +file_id = '' # TODO: Update placeholder value. # TODO: Specify destination to download media content, if desired. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.get_file(report_id, file_id) # TODO: Change code below to process the `response` object: @@ -3203,27 +2802,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_files` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_files` method: - # The DFA profile ID. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_files(profile_id, page_token: token) end @@ -3238,30 +2833,25 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_floodlight_activity` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_floodlight_activity` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight activity ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_floodlight_activity(profile_id, id) # BEFORE RUNNING: # --------------- @@ -3269,27 +2859,23 @@ service.delete_floodlight_activity(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `generate_floodlight_activity_tag` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `generate_floodlight_activity_tag` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.generate_floodlight_activity_tag(profile_id) # TODO: Change code below to process the `response` object: @@ -3300,30 +2886,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_floodlight_activity` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_floodlight_activity` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight activity ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_floodlight_activity(profile_id, id) # TODO: Change code below to process the `response` object: @@ -3334,31 +2916,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_floodlight_activity` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_floodlight_activity` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::FloodlightActivity.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_floodlight_activity(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3369,32 +2946,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_floodlight_activities` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_floodlight_activities` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -floodlightActivities = service.fetch_all(items: :floodlightActivities) do |token| +floodlight_activities = service.fetch_all(items: :floodlight_activities) do |token| service.list_floodlight_activities(profile_id, page_token: token) end -floodlightActivities.each do |floodlight_activity| +floodlight_activities.each do |floodlight_activity| # TODO: Change code below to process each `floodlight_activity` resource: puts JSON.pretty_generate(floodlight_activity) end @@ -3404,34 +2977,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_floodlight_activity` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_floodlight_activity` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight activity ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::FloodlightActivity.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_floodlight_activity(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -3442,31 +3011,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_floodlight_activity` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_floodlight_activity` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::FloodlightActivity.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_floodlight_activity(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3477,30 +3041,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_floodlight_activity_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_floodlight_activity_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight activity Group ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_floodlight_activity_group(profile_id, id) # TODO: Change code below to process the `response` object: @@ -3511,31 +3071,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_floodlight_activity_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_floodlight_activity_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::FloodlightActivityGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_floodlight_activity_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3546,32 +3101,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_floodlight_activity_groups` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_floodlight_activity_groups` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call -floodlightActivityGroups = service.fetch_all(items: :floodlightActivityGroups) do |token| +floodlight_activity_groups = service.fetch_all(items: :floodlight_activity_groups) do |token| service.list_floodlight_activity_groups(profile_id, page_token: token) end -floodlightActivityGroups.each do |floodlight_activity_group| +floodlight_activity_groups.each do |floodlight_activity_group| # TODO: Change code below to process each `floodlight_activity_group` resource: puts JSON.pretty_generate(floodlight_activity_group) end @@ -3581,34 +3132,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_floodlight_activity_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_floodlight_activity_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight activity Group ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::FloodlightActivityGroup.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_floodlight_activity_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -3619,31 +3166,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_floodlight_activity_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_floodlight_activity_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::FloodlightActivityGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_floodlight_activity_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3654,30 +3196,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_floodlight_configuration` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_floodlight_configuration` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight configuration ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_floodlight_configuration(profile_id, id) # TODO: Change code below to process the `response` object: @@ -3688,27 +3226,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_floodlight_configurations` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_floodlight_configurations` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_floodlight_configurations(profile_id) # TODO: Change code below to process the `response` object: @@ -3719,34 +3253,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_floodlight_configuration` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_floodlight_configuration` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Floodlight configuration ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::FloodlightConfiguration.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_floodlight_configuration(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -3757,31 +3287,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_floodlight_configuration` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_floodlight_configuration` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::FloodlightConfiguration.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_floodlight_configuration(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -3792,33 +3317,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_inventory_item` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_inventory_item` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID for order documents. -project_id = '' +project_id = '' # TODO: Update placeholder value. # Inventory item ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_inventory_item(profile_id, project_id, id) # TODO: Change code below to process the `response` object: @@ -3829,35 +3350,31 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_inventory_items` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_inventory_items` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID for order documents. -project_id = '' +project_id = '' # TODO: Update placeholder value. - -# Perform the call -inventoryItems = service.fetch_all(items: :inventoryItems) do |token| +inventory_items = service.fetch_all(items: :inventory_items) do |token| service.list_inventory_items(profile_id, project_id, page_token: token) end -inventoryItems.each do |inventory_item| +inventory_items.each do |inventory_item| # TODO: Change code below to process each `inventory_item` resource: puts JSON.pretty_generate(inventory_item) end @@ -3867,33 +3384,28 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_landing_page` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_landing_page` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Landing page campaign ID. -campaign_id = '' +campaign_id = '' # TODO: Update placeholder value. # Landing page ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call service.delete_landing_page(profile_id, campaign_id, id) # BEFORE RUNNING: # --------------- @@ -3901,33 +3413,29 @@ service.delete_landing_page(profile_id, campaign_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_landing_page` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_landing_page` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Landing page campaign ID. -campaign_id = '' +campaign_id = '' # TODO: Update placeholder value. # Landing page ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_landing_page(profile_id, campaign_id, id) # TODO: Change code below to process the `response` object: @@ -3938,34 +3446,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_landing_page` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `insert_landing_page` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Landing page campaign ID. -campaign_id = '' - +campaign_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::LandingPage.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_landing_page(profile_id, campaign_id, request_body) # TODO: Change code below to process the `response` object: @@ -3976,30 +3479,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_landing_pages` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_landing_pages` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Landing page campaign ID. -campaign_id = '' +campaign_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_landing_pages(profile_id, campaign_id) # TODO: Change code below to process the `response` object: @@ -4010,37 +3509,33 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_landing_page` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_landing_page` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Landing page campaign ID. -campaign_id = '' +campaign_id = '' # TODO: Update placeholder value. # Landing page ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::LandingPage.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_landing_page(profile_id, campaign_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -4051,34 +3546,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_landing_page` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_landing_page` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Landing page campaign ID. -campaign_id = '' - +campaign_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::LandingPage.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_landing_page(profile_id, campaign_id, request_body) # TODO: Change code below to process the `response` object: @@ -4089,27 +3579,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_languages` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_languages` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_languages(profile_id) # TODO: Change code below to process the `response` object: @@ -4120,27 +3606,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_metros` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_metros` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_metros(profile_id) # TODO: Change code below to process the `response` object: @@ -4151,30 +3633,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_mobile_carrier` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_mobile_carrier` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Mobile carrier ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_mobile_carrier(profile_id, id) # TODO: Change code below to process the `response` object: @@ -4185,27 +3663,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_mobile_carriers` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_mobile_carriers` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_mobile_carriers(profile_id) # TODO: Change code below to process the `response` object: @@ -4216,30 +3690,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_operating_system_version` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_operating_system_version` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Operating system version ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_operating_system_version(profile_id, id) # TODO: Change code below to process the `response` object: @@ -4250,27 +3720,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_operating_system_versions` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_operating_system_versions` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_operating_system_versions(profile_id) # TODO: Change code below to process the `response` object: @@ -4281,30 +3747,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_operating_system` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_operating_system` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Operating system DART ID. -dart_id = '' +dart_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_operating_system(profile_id, dart_id) # TODO: Change code below to process the `response` object: @@ -4315,27 +3777,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_operating_systems` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_operating_systems` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_operating_systems(profile_id) # TODO: Change code below to process the `response` object: @@ -4346,33 +3804,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_order_document` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_order_document` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID for order documents. -project_id = '' +project_id = '' # TODO: Update placeholder value. # Order document ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_order_document(profile_id, project_id, id) # TODO: Change code below to process the `response` object: @@ -4383,35 +3837,31 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_order_documents` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_order_documents` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID for order documents. -project_id = '' +project_id = '' # TODO: Update placeholder value. - -# Perform the call -orderDocuments = service.fetch_all(items: :orderDocuments) do |token| +order_documents = service.fetch_all(items: :order_documents) do |token| service.list_order_documents(profile_id, project_id, page_token: token) end -orderDocuments.each do |order_document| +order_documents.each do |order_document| # TODO: Change code below to process each `order_document` resource: puts JSON.pretty_generate(order_document) end @@ -4421,33 +3871,29 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_order` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_order` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID for orders. -project_id = '' +project_id = '' # TODO: Update placeholder value. # Order ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_order(profile_id, project_id, id) # TODO: Change code below to process the `response` object: @@ -4458,30 +3904,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_orders` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_orders` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID for orders. -project_id = '' +project_id = '' # TODO: Update placeholder value. - -# Perform the call orders = service.fetch_all(items: :orders) do |token| service.list_orders(profile_id, project_id, page_token: token) end @@ -4496,30 +3938,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_placement_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_placement_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement group ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_placement_group(profile_id, id) # TODO: Change code below to process the `response` object: @@ -4530,31 +3968,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_placement_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_placement_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::PlacementGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_placement_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -4565,32 +3998,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_placement_groups` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_placement_groups` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -placementGroups = service.fetch_all(items: :placementGroups) do |token| +placement_groups = service.fetch_all(items: :placement_groups) do |token| service.list_placement_groups(profile_id, page_token: token) end -placementGroups.each do |placement_group| +placement_groups.each do |placement_group| # TODO: Change code below to process each `placement_group` resource: puts JSON.pretty_generate(placement_group) end @@ -4600,34 +4029,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_placement_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_placement_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement group ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::PlacementGroup.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_placement_group(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -4638,31 +4063,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_placement_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_placement_group` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::PlacementGroup.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_placement_group(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -4673,30 +4093,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_placement_strategy` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_placement_strategy` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement strategy ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_placement_strategy(profile_id, id) # BEFORE RUNNING: # --------------- @@ -4704,30 +4119,26 @@ service.delete_placement_strategy(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_placement_strategy` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_placement_strategy` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement strategy ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_placement_strategy(profile_id, id) # TODO: Change code below to process the `response` object: @@ -4738,31 +4149,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_placement_strategy` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_placement_strategy` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::PlacementStrategy.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_placement_strategy(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -4773,32 +4179,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_placement_strategies` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_placement_strategies` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -placementStrategies = service.fetch_all(items: :placementStrategies) do |token| +placement_strategies = service.fetch_all(items: :placement_strategies) do |token| service.list_placement_strategies(profile_id, page_token: token) end -placementStrategies.each do |placement_strategy| +placement_strategies.each do |placement_strategy| # TODO: Change code below to process each `placement_strategy` resource: puts JSON.pretty_generate(placement_strategy) end @@ -4808,34 +4210,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_placement_strategy` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_placement_strategy` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement strategy ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::PlacementStrategy.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_placement_strategy(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -4846,31 +4244,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_placement_strategy` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_placement_strategy` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::PlacementStrategy.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_placement_strategy(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -4881,27 +4274,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `generate_placement_tags` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `generate_placement_tags` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.generate_placement_tags(profile_id) # TODO: Change code below to process the `response` object: @@ -4912,30 +4301,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_placement` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_placement` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_placement(profile_id, id) # TODO: Change code below to process the `response` object: @@ -4946,31 +4331,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_placement` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_placement` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Placement.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_placement(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -4981,27 +4361,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_placements` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_placements` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call placements = service.fetch_all(items: :placements) do |token| service.list_placements(profile_id, page_token: token) end @@ -5016,34 +4392,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_placement` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_placement` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Placement ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Placement.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_placement(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -5054,31 +4426,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_placement` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_placement` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Placement.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_placement(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -5089,30 +4456,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_platform_type` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_platform_type` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Platform type ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_platform_type(profile_id, id) # TODO: Change code below to process the `response` object: @@ -5123,27 +4486,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_platform_types` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_platform_types` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_platform_types(profile_id) # TODO: Change code below to process the `response` object: @@ -5154,30 +4513,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_postal_code` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_postal_code` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Postal code ID. -code = '{MY-CODE}' +code = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_postal_code(profile_id, code) # TODO: Change code below to process the `response` object: @@ -5188,27 +4543,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_postal_codes` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_postal_codes` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_postal_codes(profile_id) # TODO: Change code below to process the `response` object: @@ -5219,30 +4570,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_project` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_project` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Project ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_project(profile_id, id) # TODO: Change code below to process the `response` object: @@ -5253,27 +4600,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_projects` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_projects` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call projects = service.fetch_all(items: :projects) do |token| service.list_projects(profile_id, page_token: token) end @@ -5288,27 +4631,23 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_regions` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_regions` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_regions(profile_id) # TODO: Change code below to process the `response` object: @@ -5319,30 +4658,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_remarketing_list_share` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_remarketing_list_share` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Remarketing list ID. -remarketing_list_id = '' +remarketing_list_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_remarketing_list_share(profile_id, remarketing_list_id) # TODO: Change code below to process the `response` object: @@ -5353,34 +4688,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_remarketing_list_share` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_remarketing_list_share` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Remarketing list ID. -remarketing_list_id = '' - +remarketing_list_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::RemarketingListShare.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_remarketing_list_share(profile_id, remarketing_list_id, request_body) # TODO: Change code below to process the `response` object: @@ -5391,31 +4722,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_remarketing_list_share` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_remarketing_list_share` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::RemarketingListShare.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_remarketing_list_share(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -5426,30 +4752,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_remarketing_list` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_remarketing_list` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Remarketing list ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_remarketing_list(profile_id, id) # TODO: Change code below to process the `response` object: @@ -5460,31 +4782,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_remarketing_list` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_remarketing_list` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::RemarketingList.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_remarketing_list(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -5495,35 +4812,31 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_remarketing_lists` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_remarketing_lists` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Select only remarketing lists owned by this advertiser. -advertiser_id = '' - +advertiser_id = '' # TODO: Update placeholder value. -# Perform the call -remarketingLists = service.fetch_all(items: :remarketingLists) do |token| +remarketing_lists = service.fetch_all(items: :remarketing_lists) do |token| service.list_remarketing_lists(profile_id, advertiser_id, page_token: token) end -remarketingLists.each do |remarketing_list| +remarketing_lists.each do |remarketing_list| # TODO: Change code below to process each `remarketing_list` resource: puts JSON.pretty_generate(remarketing_list) end @@ -5533,34 +4846,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_remarketing_list` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_remarketing_list` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Remarketing list ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::RemarketingList.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_remarketing_list(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -5571,31 +4880,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_remarketing_list` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_remarketing_list` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::RemarketingList.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_remarketing_list(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -5606,31 +4910,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `query_report_compatible_field` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `query_report_compatible_field` method: - # The DFA user profile ID. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Report.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.query_report_compatible_field(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -5641,30 +4940,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_report` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_report` method: - # The DFA user profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the report. -report_id = '' - +report_id = '' # TODO: Update placeholder value. -# Perform the call service.delete_report(profile_id, report_id) # BEFORE RUNNING: # --------------- @@ -5672,38 +4966,33 @@ service.delete_report(profile_id, report_id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_report_file` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_report_file` method: - # The DFA profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the report. -report_id = '' +report_id = '' # TODO: Update placeholder value. # The ID of the report file. -file_id = '' - +file_id = '' # TODO: Update placeholder value. # TODO: Specify destination to download media content, if desired. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.get_report_file(profile_id, report_id, file_id) # TODO: Change code below to process the `response` object: @@ -5714,30 +5003,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_report_files` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_report_files` method: - # The DFA profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the parent report. -report_id = '' +report_id = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_report_files(profile_id, report_id, page_token: token) end @@ -5752,30 +5037,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_report` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_report` method: - # The DFA user profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the report. -report_id = '' +report_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_report(profile_id, report_id) # TODO: Change code below to process the `response` object: @@ -5786,31 +5067,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_report` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_report` method: - # The DFA user profile ID. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Report.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_report(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -5821,27 +5097,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_reports` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_reports` method: - # The DFA user profile ID. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_reports(profile_id, page_token: token) end @@ -5856,34 +5128,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_report` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_report` method: - # The DFA user profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the report. -report_id = '' - +report_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Report.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_report(profile_id, report_id, request_body) # TODO: Change code below to process the `response` object: @@ -5894,30 +5162,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `run_report` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `run_report` method: - # The DFA profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the report. -report_id = '' +report_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.run_report(profile_id, report_id) # TODO: Change code below to process the `response` object: @@ -5928,34 +5192,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_report` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfareporting service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_report` method: - # The DFA user profile ID. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # The ID of the report. -report_id = '' - +report_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Report.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_report(profile_id, report_id, request_body) # TODO: Change code below to process the `response` object: @@ -5966,30 +5225,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_site` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_site` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Site ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_site(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6000,31 +5255,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_site` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_site` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Site.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_site(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6035,27 +5285,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_sites` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_sites` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call sites = service.fetch_all(items: :sites) do |token| service.list_sites(profile_id, page_token: token) end @@ -6070,34 +5316,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_site` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_site` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Site ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Site.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_site(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -6108,31 +5350,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_site` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_site` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Site.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_site(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6143,30 +5380,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_size` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_size` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Size ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_size(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6177,31 +5410,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_size` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_size` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Size.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_size(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6212,27 +5440,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_sizes` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_sizes` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_sizes(profile_id) # TODO: Change code below to process the `response` object: @@ -6243,30 +5467,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_subaccount` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_subaccount` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Subaccount ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_subaccount(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6277,31 +5497,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_subaccount` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_subaccount` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Subaccount.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_subaccount(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6312,27 +5527,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_subaccounts` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_subaccounts` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. - -# Perform the call subaccounts = service.fetch_all(items: :subaccounts) do |token| service.list_subaccounts(profile_id, page_token: token) end @@ -6347,34 +5558,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_subaccount` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_subaccount` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Subaccount ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::Subaccount.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_subaccount(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -6385,31 +5592,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_subaccount` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_subaccount` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::Subaccount.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_subaccount(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6420,30 +5622,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_targetable_remarketing_list` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_targetable_remarketing_list` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Remarketing list ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_targetable_remarketing_list(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6454,35 +5652,31 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_targetable_remarketing_lists` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_targetable_remarketing_lists` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Select only targetable remarketing lists targetable by these advertisers. -advertiser_id = '' +advertiser_id = '' # TODO: Update placeholder value. - -# Perform the call -targetableRemarketingLists = service.fetch_all(items: :targetableRemarketingLists) do |token| +targetable_remarketing_lists = service.fetch_all(items: :targetable_remarketing_lists) do |token| service.list_targetable_remarketing_lists(profile_id, advertiser_id, page_token: token) end -targetableRemarketingLists.each do |targetable_remarketing_list| +targetable_remarketing_lists.each do |targetable_remarketing_list| # TODO: Change code below to process each `targetable_remarketing_list` resource: puts JSON.pretty_generate(targetable_remarketing_list) end @@ -6492,30 +5686,26 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_targeting_template` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_targeting_template` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Targeting template ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_targeting_template(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6526,31 +5716,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_targeting_template` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_targeting_template` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::TargetingTemplate.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_targeting_template(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6561,32 +5746,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_targeting_templates` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_targeting_templates` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -targetingTemplates = service.fetch_all(items: :targetingTemplates) do |token| +targeting_templates = service.fetch_all(items: :targeting_templates) do |token| service.list_targeting_templates(profile_id, page_token: token) end -targetingTemplates.each do |targeting_template| +targeting_templates.each do |targeting_template| # TODO: Change code below to process each `targeting_template` resource: puts JSON.pretty_generate(targeting_template) end @@ -6596,34 +5777,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_targeting_template` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_targeting_template` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # Targeting template ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::TargetingTemplate.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_targeting_template(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -6634,31 +5811,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_targeting_template` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_targeting_template` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::TargetingTemplate.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_targeting_template(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6669,28 +5841,24 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_user_profile` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/dfareporting # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `get_user_profile` method: - # The user profile ID. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_user_profile(profile_id) # TODO: Change code below to process the `response` object: @@ -6701,22 +5869,21 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_user_profiles` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/dfareporting # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# Perform the call response = service.list_user_profiles() # TODO: Change code below to process the `response` object: @@ -6727,30 +5894,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_user_role_permission_group` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_user_role_permission_group` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User role permission group ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_user_role_permission_group(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6761,27 +5924,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_user_role_permission_groups` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_user_role_permission_groups` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_user_role_permission_groups(profile_id) # TODO: Change code below to process the `response` object: @@ -6792,30 +5951,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_user_role_permission` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_user_role_permission` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User role permission ID. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_user_role_permission(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6826,27 +5981,23 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_user_role_permissions` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_user_role_permissions` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call response = service.list_user_role_permissions(profile_id) # TODO: Change code below to process the `response` object: @@ -6857,30 +6008,25 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' -require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_user_role` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_user_role` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User role ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_user_role(profile_id, id) # BEFORE RUNNING: # --------------- @@ -6888,30 +6034,26 @@ service.delete_user_role(profile_id, id) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_user_role` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_user_role` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User role ID. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_user_role(profile_id, id) # TODO: Change code below to process the `response` object: @@ -6922,31 +6064,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_user_role` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `insert_user_role` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::UserRole.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_user_role(profile_id, request_body) # TODO: Change code below to process the `response` object: @@ -6957,32 +6094,28 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_user_roles` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `list_user_roles` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. -# Perform the call -userRoles = service.fetch_all(items: :userRoles) do |token| +user_roles = service.fetch_all(items: :user_roles) do |token| service.list_user_roles(profile_id, page_token: token) end -userRoles.each do |user_role| +user_roles.each do |user_role| # TODO: Change code below to process each `user_role` resource: puts JSON.pretty_generate(user_role) end @@ -6992,34 +6125,30 @@ end # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_user_role` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_user_role` method: - # User profile ID associated with this request. -profile_id = '' +profile_id = '' # TODO: Update placeholder value. # User role ID. -id = '' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::DfareportingV2_6::UserRole.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_user_role(profile_id, id, request_body) # TODO: Change code below to process the `response` object: @@ -7030,31 +6159,26 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/dfareporting # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/dfareporting_v2_6' require 'json' service = Google::Apis::DfareportingV2_6::DfareportingService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_user_role` method, authorize using one of the following scopes: +# Authorize using the following scope: # https://www.googleapis.com/auth/dfatrafficking service.authorization = nil - -# TODO: Change placeholder below to desired parameter value for the `update_user_role` method: - # User profile ID associated with this request. -profile_id = '' - +profile_id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DfareportingV2_6::UserRole.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_user_role(profile_id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline index 0ef85d25ca..96d5a46125 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_dns.v1.json.baseline @@ -6,38 +6,32 @@ # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `create_change` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Identifies the managed zone addressed by this request. Can be the managed zone name or id. -managed_zone = '{MY-MANAGED-ZONE}' - +managed_zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DnsV1::Change.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_change(project, managed_zone, request_body) # TODO: Change code below to process the `response` object: @@ -49,37 +43,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_change` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Identifies the managed zone addressed by this request. Can be the managed zone name or id. -managed_zone = '{MY-MANAGED-ZONE}' +managed_zone = '' # TODO: Update placeholder value. # The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. -change_id = '{MY-CHANGE-ID}' +change_id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_change(project, managed_zone, change_id) # TODO: Change code below to process the `response` object: @@ -91,34 +80,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_changes` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Identifies the managed zone addressed by this request. Can be the managed zone name or id. -managed_zone = '{MY-MANAGED-ZONE}' - +managed_zone = '' # TODO: Update placeholder value. -# Perform the call changes = service.fetch_all(items: :changes) do |token| service.list_changes(project, managed_zone, page_token: token) end @@ -134,35 +118,29 @@ end # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_managed_zone` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::DnsV1::ManagedZone.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_managed_zone(project, request_body) # TODO: Change code below to process the `response` object: @@ -174,34 +152,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' -require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_managed_zone` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Identifies the managed zone addressed by this request. Can be the managed zone name or id. -managed_zone = '{MY-MANAGED-ZONE}' - +managed_zone = '' # TODO: Update placeholder value. -# Perform the call service.delete_managed_zone(project, managed_zone) # BEFORE RUNNING: # --------------- @@ -210,34 +182,29 @@ service.delete_managed_zone(project, managed_zone) # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_managed_zone` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Identifies the managed zone addressed by this request. Can be the managed zone name or id. -managed_zone = '{MY-MANAGED-ZONE}' - +managed_zone = '' # TODO: Update placeholder value. -# Perform the call response = service.get_managed_zone(project, managed_zone) # TODO: Change code below to process the `response` object: @@ -249,36 +216,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_managed_zones` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call -managedZones = service.fetch_all(items: :managedZones) do |token| +managed_zones = service.fetch_all(items: :managed_zones) do |token| service.list_managed_zones(project, page_token: token) end -managedZones.each do |managed_zone| +managed_zones.each do |managed_zone| # TODO: Change code below to process each `managed_zone` resource: puts JSON.pretty_generate(managed_zone) end @@ -289,31 +251,26 @@ end # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_project` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call response = service.get_project(project) # TODO: Change code below to process the `response` object: @@ -325,34 +282,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/dns # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/dns_v1' require 'json' service = Google::Apis::DnsV1::DnsService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_resource_record_sets` method: - # Identifies the project addressed by this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Identifies the managed zone addressed by this request. Can be the managed zone name or id. -managed_zone = '{MY-MANAGED-ZONE}' - +managed_zone = '' # TODO: Update placeholder value. -# Perform the call rrsets = service.fetch_all(items: :rrsets) do |token| service.list_resource_record_sets(project, managed_zone, page_token: token) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline index a95d5e407e..1200fde028 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_logging.v2beta1.json.baseline @@ -6,32 +6,27 @@ # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_billing_account_log` method: - # Required. The resource name of the log to delete. Example: # `"projects/my-project/logs/syslog"`. -log_name = 'billingAccounts/{MY-BILLINGACCOUNT}/logs/{MY-LOG}' - +log_name = '' # TODO: Update placeholder value. +# ex: 'billingAccounts/my-billingAccount/logs/my-log' -# Perform the call service.delete_billing_account_log(log_name) # BEFORE RUNNING: # --------------- @@ -40,29 +35,26 @@ service.delete_billing_account_log(log_name) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::LoggingV2beta1::ListLogEntriesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call entries = service.fetch_all(items: :entries) do |token| service.list_entry_log_entries(request_body, page_token: token) end @@ -78,29 +70,26 @@ end # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::LoggingV2beta1::WriteLogEntriesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.write_entry_log_entries(request_body) # TODO: Change code below to process the `response` object: @@ -112,30 +101,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call -resourceDescriptors = service.fetch_all(items: :resourceDescriptors) do |token| - service.list_monitored_resource_descriptors(, page_token: token) +resource_descriptors = service.fetch_all(items: :resource_descriptors) do |token| + service.list_monitored_resource_descriptors(page_token: token) end -resourceDescriptors.each do |monitored_resource_descriptor| +resource_descriptors.each do |monitored_resource_descriptor| # TODO: Change code below to process each `monitored_resource_descriptor` resource: puts JSON.pretty_generate(monitored_resource_descriptor) end @@ -146,32 +133,27 @@ end # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_organization_log` method: - # Required. The resource name of the log to delete. Example: # `"projects/my-project/logs/syslog"`. -log_name = 'organizations/{MY-ORGANIZATION}/logs/{MY-LOG}' - +log_name = '' # TODO: Update placeholder value. +# ex: 'organizations/my-organization/logs/my-log' -# Perform the call service.delete_organization_log(log_name) # BEFORE RUNNING: # --------------- @@ -180,32 +162,27 @@ service.delete_organization_log(log_name) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_log` method: - # Required. The resource name of the log to delete. Example: # `"projects/my-project/logs/syslog"`. -log_name = 'projects/{MY-PROJECT}/logs/{MY-LOG}' - +log_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/logs/my-log' -# Perform the call service.delete_log(log_name) # BEFORE RUNNING: # --------------- @@ -214,37 +191,32 @@ service.delete_log(log_name) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_project_metric` method: - # The resource name of the project in which to create the metric. # Example: `"projects/my-project-id"`. # The new metric must be provided in the request. -parent = 'projects/{MY-PROJECT}' - +parent = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::LoggingV2beta1::LogMetric.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_project_metric(parent, request_body) # TODO: Change code below to process the `response` object: @@ -256,32 +228,27 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_project_metric` method: - # The resource name of the metric to delete. # Example: `"projects/my-project-id/metrics/my-metric-id"`. -metric_name = 'projects/{MY-PROJECT}/metrics/{MY-METRIC}' - +metric_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/metrics/my-metric' -# Perform the call service.delete_project_metric(metric_name) # BEFORE RUNNING: # --------------- @@ -290,32 +257,28 @@ service.delete_project_metric(metric_name) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_project_metric` method: - # The resource name of the desired metric. # Example: `"projects/my-project-id/metrics/my-metric-id"`. -metric_name = 'projects/{MY-PROJECT}/metrics/{MY-METRIC}' - +metric_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/metrics/my-metric' -# Perform the call response = service.get_project_metric(metric_name) # TODO: Change code below to process the `response` object: @@ -327,32 +290,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_project_metrics` method: - # Required. The resource name containing the metrics. # Example: `"projects/my-project-id"`. -parent = 'projects/{MY-PROJECT}' +parent = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' - -# Perform the call metrics = service.fetch_all(items: :metrics) do |token| service.list_project_metrics(parent, page_token: token) end @@ -368,39 +327,34 @@ end # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `update_project_metric` method: - # The resource name of the metric to update. # Example: `"projects/my-project-id/metrics/my-metric-id"`. # The updated metric must be provided in the request and have the # same identifier that is specified in `metricName`. # If the metric does not exist, it is created. -metric_name = 'projects/{MY-PROJECT}/metrics/{MY-METRIC}' - +metric_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/metrics/my-metric' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::LoggingV2beta1::LogMetric.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_project_metric(metric_name, request_body) # TODO: Change code below to process the `response` object: @@ -412,37 +366,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_project_sink` method: - # Required. The resource in which to create the sink. # Example: `"projects/my-project-id"`. # The new sink must be provided in the request. -parent = 'projects/{MY-PROJECT}' - +parent = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::LoggingV2beta1::LogSink.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_project_sink(parent, request_body) # TODO: Change code below to process the `response` object: @@ -454,34 +403,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' -require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_project_sink` method: - # Required. The resource name of the sink to delete, including the parent # resource and the sink identifier. Example: # `"projects/my-project-id/sinks/my-sink-id"`. It is an error if the sink # does not exist. -sink_name = 'projects/{MY-PROJECT}/sinks/{MY-SINK}' +sink_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/sinks/my-sink' - -# Perform the call service.delete_project_sink(sink_name) # BEFORE RUNNING: # --------------- @@ -490,32 +434,28 @@ service.delete_project_sink(sink_name) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_project_sink` method: - # Required. The resource name of the sink to return. # Example: `"projects/my-project-id/sinks/my-sink-id"`. -sink_name = 'projects/{MY-PROJECT}/sinks/{MY-SINK}' +sink_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/sinks/my-sink' - -# Perform the call response = service.get_project_sink(sink_name) # TODO: Change code below to process the `response` object: @@ -527,32 +467,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_project_sinks` method: - # Required. The cloud resource containing the sinks. # Example: `"projects/my-logging-project"`. -parent = 'projects/{MY-PROJECT}' +parent = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' - -# Perform the call sinks = service.fetch_all(items: :sinks) do |token| service.list_project_sinks(parent, page_token: token) end @@ -568,37 +504,32 @@ end # https://console.developers.google.com/apis/api/logging # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/logging_v2beta1' require 'json' service = Google::Apis::LoggingV2beta1::LoggingService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `update_project_sink` method: - # Required. The resource name of the sink to update, including the parent # resource and the sink identifier. If the sink does not exist, this method # creates the sink. Example: `"projects/my-project-id/sinks/my-sink-id"`. -sink_name = 'projects/{MY-PROJECT}/sinks/{MY-SINK}' - +sink_name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/sinks/my-sink' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::LoggingV2beta1::LogSink.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_project_sink(sink_name, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline index cd00528e64..fcbf7b47a8 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_prediction.v1.6.json.baseline @@ -6,38 +6,32 @@ # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `predict_hosted_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of a hosted model. -hosted_model_name = '{MY-HOSTED-MODEL-NAME}' - +hosted_model_name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PredictionV1_6::Input.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.predict_hosted_model(project, hosted_model_name, request_body) # TODO: Change code below to process the `response` object: @@ -49,34 +43,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `analyze_trained_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The unique name for the predictive model. -id = '{MY-ID}' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.analyze_trained_model(project, id) # TODO: Change code below to process the `response` object: @@ -88,34 +77,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' -require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_trained_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The unique name for the predictive model. -id = '{MY-ID}' +id = '' # TODO: Update placeholder value. - -# Perform the call service.delete_trained_model(project, id) # BEFORE RUNNING: # --------------- @@ -124,34 +107,29 @@ service.delete_trained_model(project, id) # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_trained_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The unique name for the predictive model. -id = '{MY-ID}' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_trained_model(project, id) # TODO: Change code below to process the `response` object: @@ -163,35 +141,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_trained_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PredictionV1_6::Insert.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_trained_model(project, request_body) # TODO: Change code below to process the `response` object: @@ -203,31 +175,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_trained_models` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_trained_models(project, page_token: token) end @@ -243,38 +210,32 @@ end # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `predict_trained_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The unique name for the predictive model. -id = '{MY-ID}' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PredictionV1_6::Input.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.predict_trained_model(project, id, request_body) # TODO: Change code below to process the `response` object: @@ -286,38 +247,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/prediction # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/prediction_v1_6' require 'json' service = Google::Apis::PredictionV1_6::PredictionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_trained_model` method: - # The project associated with the model. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The unique name for the predictive model. -id = '{MY-ID}' - +id = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PredictionV1_6::Update.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_trained_model(project, id, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline index f3b5d0a6b1..7929be056a 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_pubsub.v1.json.baseline @@ -6,32 +6,28 @@ # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/snapshots/my-snapshot' -# TODO: Change placeholder below to desired parameter value for the `get_project_snapshot_iam_policy` method: - -# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/snapshots/{MY-SNAPSHOT}' - - -# Perform the call response = service.get_project_snapshot_iam_policy(resource) # TODO: Change code below to process the `response` object: @@ -43,36 +39,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/snapshots/my-snapshot' -# TODO: Change placeholder below to desired parameter value for the `set_snapshot_iam_policy` method: - -# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/snapshots/{MY-SNAPSHOT}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::SetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_snapshot_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -84,36 +75,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `test_snapshot_iam_permissions` method: - # REQUIRED: The resource for which the policy detail is being requested. `resource` is usually # specified as a path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/snapshots/{MY-SNAPSHOT}' - +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/snapshots/my-snapshot' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::TestIamPermissionsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.test_snapshot_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: @@ -125,35 +111,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `acknowledge_subscription` method: - # The subscription whose message is being acknowledged. -subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +subscription = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::AcknowledgeRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.acknowledge_subscription(subscription, request_body) # BEFORE RUNNING: # --------------- @@ -162,39 +142,34 @@ service.acknowledge_subscription(subscription, request_body) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_subscription` method: - # The name of the subscription. It must have the format # `"projects/{project}/subscriptions/{subscription}"`. `{subscription}` must start with a letter, and # contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods # (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in # length, and it must not start with `"goog"`. -name = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::Subscription.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_subscription(name, request_body) # TODO: Change code below to process the `response` object: @@ -206,31 +181,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_subscription` method: - # The subscription to delete. -subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +subscription = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' -# Perform the call service.delete_subscription(subscription) # BEFORE RUNNING: # --------------- @@ -239,31 +209,27 @@ service.delete_subscription(subscription) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_subscription` method: - # The name of the subscription to get. -subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +subscription = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' -# Perform the call response = service.get_subscription(subscription) # TODO: Change code below to process the `response` object: @@ -275,32 +241,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' -# TODO: Change placeholder below to desired parameter value for the `get_project_subscription_iam_policy` method: - -# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - - -# Perform the call response = service.get_project_subscription_iam_policy(resource) # TODO: Change code below to process the `response` object: @@ -312,31 +274,27 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_subscriptions` method: - # The name of the cloud project that subscriptions belong to. -project = 'projects/{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' -# Perform the call subscriptions = service.fetch_all(items: :subscriptions) do |token| service.list_subscriptions(project, page_token: token) end @@ -352,35 +310,29 @@ end # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `modify_subscription_ack_deadline` method: - # The name of the subscription. -subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +subscription = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::ModifyAckDeadlineRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.modify_subscription_ack_deadline(subscription, request_body) # BEFORE RUNNING: # --------------- @@ -389,35 +341,29 @@ service.modify_subscription_ack_deadline(subscription, request_body) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `modify_subscription_push_config` method: - # The name of the subscription. -subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +subscription = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::ModifyPushConfigRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.modify_subscription_push_config(subscription, request_body) # BEFORE RUNNING: # --------------- @@ -426,35 +372,30 @@ service.modify_subscription_push_config(subscription, request_body) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `pull_subscription` method: - # The subscription from which messages should be pulled. -subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +subscription = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::PullRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.pull_subscription(subscription, request_body) # TODO: Change code below to process the `response` object: @@ -466,36 +407,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' -# TODO: Change placeholder below to desired parameter value for the `set_subscription_iam_policy` method: - -# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::SetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_subscription_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -507,36 +443,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `test_subscription_iam_permissions` method: - # REQUIRED: The resource for which the policy detail is being requested. `resource` is usually # specified as a path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}' - +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/subscriptions/my-subscription' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::TestIamPermissionsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.test_subscription_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: @@ -548,38 +479,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `create_topic` method: - -# The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` must -# start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), +# The name of the topic. It must have the format `"projects/{project}/topics/{topic}"`. `{topic}` +# must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), # underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be # between 3 and 255 characters in length, and it must not start with `"goog"`. -name = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' - +name = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::Topic.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_topic(name, request_body) # TODO: Change code below to process the `response` object: @@ -591,31 +517,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' -require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_topic` method: - # Name of the topic to delete. -topic = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' +topic = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' - -# Perform the call service.delete_topic(topic) # BEFORE RUNNING: # --------------- @@ -624,31 +545,27 @@ service.delete_topic(topic) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_topic` method: - # The name of the topic to get. -topic = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' - +topic = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' -# Perform the call response = service.get_topic(topic) # TODO: Change code below to process the `response` object: @@ -660,32 +577,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' -# TODO: Change placeholder below to desired parameter value for the `get_project_topic_iam_policy` method: - -# REQUIRED: The resource for which the policy is being requested. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' - - -# Perform the call response = service.get_project_topic_iam_policy(resource) # TODO: Change code below to process the `response` object: @@ -697,31 +610,27 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_topics` method: - # The name of the cloud project that topics belong to. -project = 'projects/{MY-PROJECT}' +project = '' # TODO: Update placeholder value. +# ex: 'projects/my-project' - -# Perform the call topics = service.fetch_all(items: :topics) do |token| service.list_topics(project, page_token: token) end @@ -737,35 +646,30 @@ end # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `publish_topic` method: - # The messages in the request will be published on this topic. -topic = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' - +topic = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::PublishRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.publish_topic(topic, request_body) # TODO: Change code below to process the `response` object: @@ -777,36 +681,31 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as +# a path. For example, a Project resource is specified as `projects/{project}`. +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' -# TODO: Change placeholder below to desired parameter value for the `set_topic_iam_policy` method: - -# REQUIRED: The resource for which the policy is being specified. `resource` is usually specified as a -# path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::SetIamPolicyRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.set_topic_iam_policy(resource, request_body) # TODO: Change code below to process the `response` object: @@ -818,31 +717,27 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_topic_subscriptions` method: - # The name of the topic that subscriptions are attached to. -topic = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' +topic = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' - -# Perform the call subscriptions = service.fetch_all(items: :subscriptions) do |token| service.list_topic_subscriptions(topic, page_token: token) end @@ -858,36 +753,31 @@ end # https://console.developers.google.com/apis/api/pubsub # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/pubsub_v1' require 'json' service = Google::Apis::PubsubV1::PubsubService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `test_topic_iam_permissions` method: - # REQUIRED: The resource for which the policy detail is being requested. `resource` is usually # specified as a path. For example, a Project resource is specified as `projects/{project}`. -resource = 'projects/{MY-PROJECT}/topics/{MY-TOPIC}' - +resource = '' # TODO: Update placeholder value. +# ex: 'projects/my-project/topics/my-topic' +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::PubsubV1::TestIamPermissionsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.test_topic_iam_permissions(resource, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline index f06e4407a5..bb697a9357 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_replicapoolupdater.v1beta1.json.baseline @@ -6,37 +6,32 @@ # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `cancel_rolling_update` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the update. -rolling_update = '{MY-ROLLING-UPDATE}' +rolling_update = '' # TODO: Update placeholder value. - -# Perform the call response = service.cancel_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: @@ -48,37 +43,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_rolling_update` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the update. -rolling_update = '{MY-ROLLING-UPDATE}' - +rolling_update = '' # TODO: Update placeholder value. -# Perform the call response = service.get_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: @@ -90,38 +80,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_rolling_update` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::ReplicapoolupdaterV1beta1::RollingUpdate.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_rolling_update(project, zone, request_body) # TODO: Change code below to process the `response` object: @@ -133,34 +117,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_rolling_updates` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_rolling_updates(project, zone, page_token: token) end @@ -176,37 +155,32 @@ end # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_instance_updates` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the update. -rolling_update = '{MY-ROLLING-UPDATE}' - +rolling_update = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instance_updates(project, zone, rolling_update, page_token: token) end @@ -222,37 +196,32 @@ end # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `pause_rolling_update` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the update. -rolling_update = '{MY-ROLLING-UPDATE}' +rolling_update = '' # TODO: Update placeholder value. - -# Perform the call response = service.pause_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: @@ -264,37 +233,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `resume_rolling_update` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the update. -rolling_update = '{MY-ROLLING-UPDATE}' - +rolling_update = '' # TODO: Update placeholder value. -# Perform the call response = service.resume_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: @@ -306,37 +270,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `rollback_rolling_update` method: - # The Google Developers Console project name. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The name of the zone in which the update's target resides. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # The name of the update. -rolling_update = '{MY-ROLLING-UPDATE}' - +rolling_update = '' # TODO: Update placeholder value. -# Perform the call response = service.rollback_rolling_update(project, zone, rolling_update) # TODO: Change code below to process the `response` object: @@ -348,37 +307,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_zone_operation` method: - # Name of the project scoping this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone scoping this request. -zone = '{MY-ZONE}' +zone = '' # TODO: Update placeholder value. # Name of the operation resource to return. -operation = '{MY-OPERATION}' +operation = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_zone_operation(project, zone, operation) # TODO: Change code below to process the `response` object: @@ -390,34 +344,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/replicapoolupdater # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/replicapoolupdater_v1beta1' require 'json' service = Google::Apis::ReplicapoolupdaterV1beta1::ReplicapoolupdaterService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_zone_operations` method: - # Name of the project scoping this request. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Name of the zone scoping this request. -zone = '{MY-ZONE}' - +zone = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_zone_operations(project, zone, page_token: token) end diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline index f243f288c4..70a45eb990 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_sqladmin.v1beta4.json.baseline @@ -6,37 +6,32 @@ # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_backup_run` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # The ID of the Backup Run to delete. To find a Backup Run ID, use the list method. -id = '' +id = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_backup_run(project, instance, id) # TODO: Change code below to process the `response` object: @@ -48,37 +43,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_backup_run` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # The ID of this Backup Run. -id = '' - +id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_backup_run(project, instance, id) # TODO: Change code below to process the `response` object: @@ -90,38 +80,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_backup_run` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::BackupRun.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_backup_run(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -133,34 +117,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_backup_runs` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_backup_runs(project, instance, page_token: token) end @@ -176,37 +155,32 @@ end # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_database` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Name of the database to be deleted in the instance. -database = '{MY-DATABASE}' +database = '' # TODO: Update placeholder value. - -# Perform the call response = service.delete_database(project, instance, database) # TODO: Change code below to process the `response` object: @@ -218,37 +192,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_database` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Name of the database in the instance. -database = '{MY-DATABASE}' - +database = '' # TODO: Update placeholder value. -# Perform the call response = service.get_database(project, instance, database) # TODO: Change code below to process the `response` object: @@ -260,38 +229,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_database` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::Database.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_database(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -303,34 +266,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_databases` method: - # Project ID of the project for which to list Cloud SQL instances. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_databases(project, instance) # TODO: Change code below to process the `response` object: @@ -342,41 +300,36 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_database` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Name of the database to be updated in the instance. -database = '{MY-DATABASE}' - +database = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::SqladminV1beta4::Database.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_database(project, instance, database, request_body) # TODO: Change code below to process the `response` object: @@ -388,41 +341,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_database` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Name of the database to be updated in the instance. -database = '{MY-DATABASE}' - +database = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::Database.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_database(project, instance, database, request_body) # TODO: Change code below to process the `response` object: @@ -434,25 +381,23 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call response = service.list_flags() # TODO: Change code below to process the `response` object: @@ -464,38 +409,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `clone_instance` method: - # Project ID of the source as well as the clone Cloud SQL instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The ID of the Cloud SQL instance to be cloned (source). This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::CloneInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.clone_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -507,34 +446,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_instance` method: - # Project ID of the project that contains the instance to be deleted. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_instance(project, instance) # TODO: Change code below to process the `response` object: @@ -546,38 +480,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `export_instance` method: - # Project ID of the project that contains the instance to be exported. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::ExportInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.export_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -589,38 +517,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `failover_instance` method: - # ID of the project that contains the read replica. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::InstancesFailoverRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.failover_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -632,34 +554,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_instance` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.get_instance(project, instance) # TODO: Change code below to process the `response` object: @@ -671,38 +588,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `import_instance` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::ImportInstancesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.import_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -714,35 +625,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_instance` method: - # Project ID of the project to which the newly created Cloud SQL instances should belong. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::DatabaseInstance.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_instance(project, request_body) # TODO: Change code below to process the `response` object: @@ -754,31 +659,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_instances` method: - # Project ID of the project for which to list Cloud SQL instances. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_instances(project, page_token: token) end @@ -794,38 +694,33 @@ end # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_instance` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::SqladminV1beta4::DatabaseInstance.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -837,34 +732,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `promote_instance_replica` method: - # ID of the project that contains the read replica. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL read replica instance name. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.promote_instance_replica(project, instance) # TODO: Change code below to process the `response` object: @@ -876,34 +766,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `reset_instance_ssl_config` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.reset_instance_ssl_config(project, instance) # TODO: Change code below to process the `response` object: @@ -915,34 +800,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `restart_instance` method: - # Project ID of the project that contains the instance to be restarted. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.restart_instance(project, instance) # TODO: Change code below to process the `response` object: @@ -954,38 +834,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `restore_instance_backup` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::RestoreInstancesBackupRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.restore_instance_backup(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -997,34 +871,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `start_instance_replica` method: - # ID of the project that contains the read replica. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL read replica instance name. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. - -# Perform the call response = service.start_instance_replica(project, instance) # TODO: Change code below to process the `response` object: @@ -1036,34 +905,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `stop_instance_replica` method: - # ID of the project that contains the read replica. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL read replica instance name. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.stop_instance_replica(project, instance) # TODO: Change code below to process the `response` object: @@ -1075,38 +939,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_instance` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::DatabaseInstance.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_instance(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -1118,34 +976,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_operation` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Instance operation ID. -operation = '{MY-OPERATION}' +operation = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_operation(project, operation) # TODO: Change code below to process the `response` object: @@ -1157,34 +1010,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_operations` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_operations(project, instance, page_token: token) end @@ -1200,38 +1048,32 @@ end # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `create_ssl_cert_ephemeral` method: - # Project ID of the Cloud SQL project. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::SslCertsCreateEphemeralRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_ssl_cert_ephemeral(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -1243,37 +1085,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_ssl_cert` method: - # Project ID of the project that contains the instance to be deleted. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Sha1 FingerPrint. -sha1_fingerprint = '{MY-SHA1-FINGERPRINT}' - +sha1_fingerprint = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_ssl_cert(project, instance, sha1_fingerprint) # TODO: Change code below to process the `response` object: @@ -1285,37 +1122,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_ssl_cert` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Sha1 FingerPrint. -sha1_fingerprint = '{MY-SHA1-FINGERPRINT}' +sha1_fingerprint = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_ssl_cert(project, instance, sha1_fingerprint) # TODO: Change code below to process the `response` object: @@ -1327,38 +1159,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_ssl_cert` method: - # Project ID of the project to which the newly created Cloud SQL instances should belong. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::InsertSslCertsRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_ssl_cert(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -1370,34 +1196,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_ssl_certs` method: - # Project ID of the project for which to list Cloud SQL instances. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Cloud SQL instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call response = service.list_ssl_certs(project, instance) # TODO: Change code below to process the `response` object: @@ -1409,31 +1230,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_tiers` method: - # Project ID of the project for which to list tiers. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call response = service.list_tiers(project) # TODO: Change code below to process the `response` object: @@ -1445,40 +1261,35 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_user` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Host of the user in the instance. -host = '{MY-HOST}' +host = '' # TODO: Update placeholder value. # Name of the user in the instance. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. -# Perform the call response = service.delete_user(project, instance, host, name) # TODO: Change code below to process the `response` object: @@ -1490,38 +1301,32 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_user` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::User.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_user(project, instance, request_body) # TODO: Change code below to process the `response` object: @@ -1533,38 +1338,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_users` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' - +instance = '' # TODO: Update placeholder value. -# Perform the call -response = service.list_users(project, instance) +items = service.fetch_all(items: :items) do |token| + service.list_users(project, instance, page_token: token) +end -# TODO: Change code below to process the `response` object: -puts JSON.pretty_generate(response) +items.each do |user| + # TODO: Change code below to process each `user` resource: + puts JSON.pretty_generate(user) +end # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API @@ -1572,44 +1376,38 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/sqladmin # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/sqladmin_v1beta4' require 'json' service = Google::Apis::SqladminV1beta4::SQLAdminService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_user` method: - # Project ID of the project that contains the instance. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. -instance = '{MY-INSTANCE}' +instance = '' # TODO: Update placeholder value. # Host of the user in the instance. -host = '{MY-HOST}' +host = '' # TODO: Update placeholder value. # Name of the user in the instance. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::SqladminV1beta4::User.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_user(project, instance, host, name, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline index 04599586ff..1579899a3e 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storage.v1.json.baseline @@ -6,35 +6,29 @@ # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_bucket_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. -# Perform the call service.delete_bucket_access_control(bucket, entity) # BEFORE RUNNING: # --------------- @@ -43,35 +37,30 @@ service.delete_bucket_access_control(bucket, entity) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_bucket_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. -# Perform the call response = service.get_bucket_access_control(bucket, entity) # TODO: Change code below to process the `response` object: @@ -83,35 +72,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_bucket_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::BucketAccessControl.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_bucket_access_control(bucket, request_body) # TODO: Change code below to process the `response` object: @@ -123,31 +106,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_bucket_access_controls` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_bucket_access_controls(bucket) # TODO: Change code below to process the `response` object: @@ -159,39 +137,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_bucket_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::StorageV1::BucketAccessControl.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_bucket_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: @@ -203,39 +176,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_bucket_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::BucketAccessControl.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_bucket_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: @@ -247,31 +214,25 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_bucket` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. -# Perform the call service.delete_bucket(bucket) # BEFORE RUNNING: # --------------- @@ -280,31 +241,26 @@ service.delete_bucket(bucket) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_bucket` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_bucket(bucket) # TODO: Change code below to process the `response` object: @@ -316,35 +272,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_bucket` method: - # A valid API project identifier. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Bucket.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_bucket(project, request_body) # TODO: Change code below to process the `response` object: @@ -356,31 +306,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_buckets` method: - # A valid API project identifier. -project = '{MY-PROJECT}' - +project = '' # TODO: Update placeholder value. -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_buckets(project, page_token: token) end @@ -396,35 +341,30 @@ end # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `patch_bucket` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::StorageV1::Bucket.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_bucket(bucket, request_body) # TODO: Change code below to process the `response` object: @@ -436,35 +376,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `update_bucket` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Bucket.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_bucket(bucket, request_body) # TODO: Change code below to process the `response` object: @@ -476,29 +410,25 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Channel.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.stop_channel(request_body) # BEFORE RUNNING: # --------------- @@ -507,35 +437,29 @@ service.stop_channel(request_body) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_default_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. -# Perform the call service.delete_default_object_access_control(bucket, entity) # BEFORE RUNNING: # --------------- @@ -544,35 +468,30 @@ service.delete_default_object_access_control(bucket, entity) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_default_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' +entity = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_default_object_access_control(bucket, entity) # TODO: Change code below to process the `response` object: @@ -584,35 +503,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `insert_default_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::ObjectAccessControl.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_default_object_access_control(bucket, request_body) # TODO: Change code below to process the `response` object: @@ -624,31 +537,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_default_object_access_controls` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. -# Perform the call response = service.list_default_object_access_controls(bucket) # TODO: Change code below to process the `response` object: @@ -660,39 +568,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_default_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::StorageV1::ObjectAccessControl.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_default_object_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: @@ -704,39 +607,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_default_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::ObjectAccessControl.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_default_object_access_control(bucket, entity, request_body) # TODO: Change code below to process the `response` object: @@ -748,39 +645,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' +object = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' +entity = '' # TODO: Update placeholder value. - -# Perform the call service.delete_object_access_control(bucket, object, entity) # BEFORE RUNNING: # --------------- @@ -789,39 +680,34 @@ service.delete_object_access_control(bucket, object, entity) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' +object = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. -# Perform the call response = service.get_object_access_control(bucket, object, entity) # TODO: Change code below to process the `response` object: @@ -833,39 +719,33 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `insert_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' - +object = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::ObjectAccessControl.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_object_access_control(bucket, object, request_body) # TODO: Change code below to process the `response` object: @@ -877,35 +757,30 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `list_object_access_controls` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' - +object = '' # TODO: Update placeholder value. -# Perform the call response = service.list_object_access_controls(bucket, object) # TODO: Change code below to process the `response` object: @@ -917,43 +792,38 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' +object = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::StorageV1::ObjectAccessControl.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_object_access_control(bucket, object, entity, request_body) # TODO: Change code below to process the `response` object: @@ -965,43 +835,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_object_access_control` method: - # Name of a bucket. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' +object = '' # TODO: Update placeholder value. # The entity holding the permission. Can be user-userId, user-emailAddress, group-groupId, # group-emailAddress, allUsers, or allAuthenticatedUsers. -entity = '{MY-ENTITY}' - +entity = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::ObjectAccessControl.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_object_access_control(bucket, object, entity, request_body) # TODO: Change code below to process the `response` object: @@ -1013,44 +877,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `compose_object` method: - # Name of the bucket in which to store the new object. -destination_bucket = '{MY-DESTINATION-BUCKET}' +destination_bucket = '' # TODO: Update placeholder value. # Name of the new object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -destination_object = '{MY-DESTINATION-OBJECT}' - +destination_object = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::ComposeRequest.new -# TODO: Assign values to desired members of the `request_body` object. - # TODO: Specify destination to download media content, if desired. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.compose_object(destination_bucket, destination_object, request_body) # TODO: Change code below to process the `response` object: @@ -1062,53 +919,46 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `copy_object` method: - # Name of the bucket in which to find the source object. -source_bucket = '{MY-SOURCE-BUCKET}' +source_bucket = '' # TODO: Update placeholder value. -# Name of the source object. For information about how to URL encode object names to be path safe, see -# Encoding URI Path Parts. -source_object = '{MY-SOURCE-OBJECT}' +# Name of the source object. For information about how to URL encode object names to be path safe, +# see Encoding URI Path Parts. +source_object = '' # TODO: Update placeholder value. -# Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket -# value, if any.For information about how to URL encode object names to be path safe, see Encoding URI -# Path Parts. -destination_bucket = '{MY-DESTINATION-BUCKET}' +# Name of the bucket in which to store the new object. Overrides the provided object metadata's +# bucket value, if any.For information about how to URL encode object names to be path safe, see +# Encoding URI Path Parts. +destination_bucket = '' # TODO: Update placeholder value. # Name of the new object. Required when the object metadata is not otherwise provided. Overrides the # object metadata's name value, if any. -destination_object = '{MY-DESTINATION-OBJECT}' - +destination_object = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Object.new -# TODO: Assign values to desired members of the `request_body` object. - # TODO: Specify destination to download media content, if desired. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.copy_object(source_bucket, source_object, destination_bucket, destination_object, request_body) # TODO: Change code below to process the `response` object: @@ -1120,35 +970,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' -require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `delete_object` method: - # Name of the bucket in which the object resides. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' - +object = '' # TODO: Update placeholder value. -# Perform the call service.delete_object(bucket, object) # BEFORE RUNNING: # --------------- @@ -1157,40 +1001,34 @@ service.delete_object(bucket, object) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `get_object` method: - # Name of the bucket in which the object resides. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' - +object = '' # TODO: Update placeholder value. # TODO: Specify destination to download media content, if desired. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.get_object(bucket, object) # TODO: Change code below to process the `response` object: @@ -1202,41 +1040,34 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) +# Name of the bucket in which to store the new object. Overrides the provided object metadata's +# bucket value, if any. +bucket = '' # TODO: Update placeholder value. -# TODO: Change placeholder below to desired parameter value for the `insert_object` method: - -# Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket -# value, if any. -bucket = '{MY-BUCKET}' - - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Object.new -# TODO: Assign values to desired members of the `request_body` object. - # TODO: Add desired media content for upload. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.insert_object(bucket, request_body) # TODO: Change code below to process the `response` object: @@ -1248,31 +1079,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_objects` method: - # Name of the bucket in which to look for objects. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. - -# Perform the call items = service.fetch_all(items: :items) do |token| service.list_objects(bucket, page_token: token) end @@ -1288,39 +1114,34 @@ end # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `patch_object` method: - # Name of the bucket in which the object resides. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' - +object = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::StorageV1::Object.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_object(bucket, object, request_body) # TODO: Change code below to process the `response` object: @@ -1332,48 +1153,42 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `rewrite_object` method: - # Name of the bucket in which to find the source object. -source_bucket = '{MY-SOURCE-BUCKET}' +source_bucket = '' # TODO: Update placeholder value. -# Name of the source object. For information about how to URL encode object names to be path safe, see -# Encoding URI Path Parts. -source_object = '{MY-SOURCE-OBJECT}' +# Name of the source object. For information about how to URL encode object names to be path safe, +# see Encoding URI Path Parts. +source_object = '' # TODO: Update placeholder value. -# Name of the bucket in which to store the new object. Overrides the provided object metadata's bucket -# value, if any. -destination_bucket = '{MY-DESTINATION-BUCKET}' +# Name of the bucket in which to store the new object. Overrides the provided object metadata's +# bucket value, if any. +destination_bucket = '' # TODO: Update placeholder value. # Name of the new object. Required when the object metadata is not otherwise provided. Overrides the # object metadata's name value, if any. For information about how to URL encode object names to be # path safe, see Encoding URI Path Parts. -destination_object = '{MY-DESTINATION-OBJECT}' - +destination_object = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Object.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.rewrite_object(source_bucket, source_object, destination_bucket, destination_object, request_body) # TODO: Change code below to process the `response` object: @@ -1385,44 +1200,37 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholders below to desired parameter values for the `update_object` method: - # Name of the bucket in which the object resides. -bucket = '{MY-BUCKET}' +bucket = '' # TODO: Update placeholder value. # Name of the object. For information about how to URL encode object names to be path safe, see # Encoding URI Path Parts. -object = '{MY-OBJECT}' - +object = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Object.new -# TODO: Assign values to desired members of the `request_body` object. - # TODO: Specify destination to download media content, if desired. For more information, see: # https://github.com/google/google-api-ruby-client#basic-usage # https://github.com/google/google-api-ruby-client#media - -# Perform the call response = service.update_object(bucket, object, request_body) # TODO: Change code below to process the `response` object: @@ -1434,35 +1242,29 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storage # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storage_v1' require 'json' service = Google::Apis::StorageV1::StorageService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `watch_all_objects` method: - # Name of the bucket in which to look for objects. -bucket = '{MY-BUCKET}' - +bucket = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StorageV1::Channel.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.watch_all_objects(bucket, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline index 82710feb97..cbcac110be 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_storagetransfer.v1.json.baseline @@ -6,25 +6,23 @@ # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call response = service.get_google_service_account_v1() # TODO: Change code below to process the `response` object: @@ -36,32 +34,27 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_google_service_account` method: - # The ID of the Google Developers Console project that the Google service account is associated with. # Required. -project_id = '{MY-PROJECT-ID}' - +project_id = '' # TODO: Update placeholder value. -# Perform the call response = service.get_google_service_account(project_id) # TODO: Change code below to process the `response` object: @@ -73,29 +66,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StoragetransferV1::TransferJob.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.create_transfer_job(request_body) # TODO: Change code below to process the `response` object: @@ -107,31 +97,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_transfer_job` method: - # The job to get. Required. -job_name = '{MY-JOB-NAME}' - +job_name = '' # TODO: Update placeholder value. -# Perform the call response = service.get_transfer_job(job_name) # TODO: Change code below to process the `response` object: @@ -143,30 +128,28 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# Perform the call -transferJobs = service.fetch_all(items: :transferJobs) do |token| - service.list_transfer_jobs(, page_token: token) +transfer_jobs = service.fetch_all(items: :transfer_jobs) do |token| + service.list_transfer_jobs(page_token: token) end -transferJobs.each do |transfer_job| +transfer_jobs.each do |transfer_job| # TODO: Change code below to process each `transfer_job` resource: puts JSON.pretty_generate(transfer_job) end @@ -177,35 +160,30 @@ end # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `patch_transfer_job` method: - # The name of job to update. Required. -job_name = '{MY-JOB-NAME}' - +job_name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::StoragetransferV1::UpdateTransferJobRequest.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_transfer_job(job_name, request_body) # TODO: Change code below to process the `response` object: @@ -217,31 +195,25 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `cancel_transfer_operation` method: - # The name of the operation resource to be cancelled. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. -# Perform the call service.cancel_transfer_operation(name) # BEFORE RUNNING: # --------------- @@ -250,31 +222,25 @@ service.cancel_transfer_operation(name) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `delete_transfer_operation` method: - # The name of the operation resource to be deleted. -name = '{MY-NAME}' +name = '' # TODO: Update placeholder value. - -# Perform the call service.delete_transfer_operation(name) # BEFORE RUNNING: # --------------- @@ -283,31 +249,26 @@ service.delete_transfer_operation(name) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `get_transfer_operation` method: - # The name of the operation resource. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. -# Perform the call response = service.get_transfer_operation(name) # TODO: Change code below to process the `response` object: @@ -319,31 +280,26 @@ puts JSON.pretty_generate(response) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `list_transfer_operations` method: - # The value `transferOperations`. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. -# Perform the call operations = service.fetch_all(items: :operations) do |token| service.list_transfer_operations(name, page_token: token) end @@ -359,35 +315,28 @@ end # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `pause_transfer_operation` method: - # The name of the transfer operation. Required. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StoragetransferV1::PauseTransferOperationRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.pause_transfer_operation(name, request_body) # BEFORE RUNNING: # --------------- @@ -396,33 +345,26 @@ service.pause_transfer_operation(name, request_body) # https://console.developers.google.com/apis/api/storagetransfer # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/storagetransfer_v1' -require 'json' service = Google::Apis::StoragetransferV1::StoragetransferService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - -# TODO: Change placeholder below to desired parameter value for the `resume_transfer_operation` method: - # The name of the transfer operation. Required. -name = '{MY-NAME}' - +name = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::StoragetransferV1::ResumeTransferOperationRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call service.resume_transfer_operation(name, request_body) diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline index ecf6007bce..a4c437946e 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_taskqueue.v1beta2.json.baseline @@ -5,31 +5,27 @@ # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_taskqueue` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_taskqueue` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The id of the taskqueue to get the properties of. -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_taskqueue(project, taskqueue) # TODO: Change code below to process the `response` object: @@ -40,34 +36,29 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' -require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `delete_task` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `delete_task` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The taskqueue to delete a task from. -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. # The id of the task to delete. -task = '{MY-TASK}' - +task = '' # TODO: Update placeholder value. -# Perform the call service.delete_task(project, taskqueue, task) # BEFORE RUNNING: # --------------- @@ -75,34 +66,30 @@ service.delete_task(project, taskqueue, task) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `get_task` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `get_task` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The taskqueue in which the task belongs. -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. # The task to get properties of. -task = '{MY-TASK}' +task = '' # TODO: Update placeholder value. - -# Perform the call response = service.get_task(project, taskqueue, task) # TODO: Change code below to process the `response` object: @@ -113,35 +100,30 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `insert_task` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `insert_task` method: - # The project under which the queue lies -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The taskqueue to insert the task into -taskqueue = '{MY-TASKQUEUE}' - +taskqueue = '' # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::TaskqueueV1beta2::Task.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.insert_task(project, taskqueue, request_body) # TODO: Change code below to process the `response` object: @@ -152,37 +134,33 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `lease_task` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `lease_task` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The taskqueue to lease a task from. -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. # The number of tasks to lease. -num_tasks = 0 +num_tasks = 0 # TODO: Update placeholder value. # The lease in seconds. -lease_secs = 0 +lease_secs = 0 # TODO: Update placeholder value. - -# Perform the call response = service.lease_task(project, taskqueue, num_tasks, lease_secs) # TODO: Change code below to process the `response` object: @@ -193,31 +171,27 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `list_tasks` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `list_tasks` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. # The id of the taskqueue to list tasks from. -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. - -# Perform the call response = service.list_tasks(project, taskqueue) # TODO: Change code below to process the `response` object: @@ -228,41 +202,35 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `patch_task` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `patch_task` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. -# taskqueue -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. -# task -task = '{MY-TASK}' +task = '' # TODO: Update placeholder value. # The new lease in seconds. -new_lease_seconds = 0 - +new_lease_seconds = 0 # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`. Only assigned +# fields will be changed: request_body = Google::Apis::TaskqueueV1beta2::Task.new -# TODO: Assign values to desired members of the `request_body` object to be changed. - -# Perform the call response = service.patch_task(project, taskqueue, task, new_lease_seconds, request_body) # TODO: Change code below to process the `response` object: @@ -273,41 +241,34 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/taskqueue # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/taskqueue_v1beta2' require 'json' service = Google::Apis::TaskqueueV1beta2::TaskqueueService.new -# TODO: Change placeholder below to get authentication credentials. -# See: https://foo.com/bar +# TODO: Change placeholder below to generate authentication credentials. See: +# https://foo.com/bar # -# To use the `update_task` method, authorize using one of the following scopes: +# Authorize using one of the following scopes: # https://www.googleapis.com/auth/taskqueue # https://www.googleapis.com/auth/taskqueue.consumer service.authorization = nil - -# TODO: Change placeholders below to desired parameter values for the `update_task` method: - # The project under which the queue lies. -project = '{MY-PROJECT}' +project = '' # TODO: Update placeholder value. -# taskqueue -taskqueue = '{MY-TASKQUEUE}' +taskqueue = '' # TODO: Update placeholder value. -# task -task = '{MY-TASK}' +task = '' # TODO: Update placeholder value. # The new lease in seconds. -new_lease_seconds = 0 - +new_lease_seconds = 0 # TODO: Update placeholder value. +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::TaskqueueV1beta2::Task.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.update_task(project, taskqueue, task, new_lease_seconds, request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline index 0c84f08e94..adc1726b0c 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_translate.v2.json.baseline @@ -5,23 +5,18 @@ # and check the quota for your project at # https://console.developers.google.com/apis/api/translate # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/translate_v2' require 'json' service = Google::Apis::TranslateV2::TranslateService.new -# TODO: Change placeholder below to desired API key: -service.key = '{MY-API-KEY}' - - -# TODO: Change placeholder below to desired parameter value for the `list_detections` method: +service.key = '' # TODO: Update placeholder with desired API key. # The text to detect -q = [] +q = [] # TODO: Update placeholder value. - -# Perform the call response = service.list_detections(q) # TODO: Change code below to process the `response` object: @@ -32,17 +27,15 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/translate # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/translate_v2' require 'json' service = Google::Apis::TranslateV2::TranslateService.new -# TODO: Change placeholder below to desired API key: -service.key = '{MY-API-KEY}' +service.key = '' # TODO: Update placeholder with desired API key. - -# Perform the call response = service.list_languages() # TODO: Change code below to process the `response` object: @@ -53,26 +46,21 @@ puts JSON.pretty_generate(response) # and check the quota for your project at # https://console.developers.google.com/apis/api/translate # 2. Install the Ruby client library by running `gem install google-api-client` + require 'googleauth' require 'google/apis/translate_v2' require 'json' service = Google::Apis::TranslateV2::TranslateService.new -# TODO: Change placeholder below to desired API key: -service.key = '{MY-API-KEY}' - - -# TODO: Change placeholders below to desired parameter values for the `list_translations` method: +service.key = '' # TODO: Update placeholder with desired API key. # The text to translate -q = [] +q = [] # TODO: Update placeholder value. # The target language into which the text should be translated -target = '{MY-TARGET}' - +target = '' # TODO: Update placeholder value. -# Perform the call response = service.list_translations(q, target) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline index 2fdcc68c5b..c9f8599dab 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/ruby/ruby_vision.v1.json.baseline @@ -6,29 +6,26 @@ # https://console.developers.google.com/apis/api/vision # 2. This sample uses Application Default Credentials for authentication. # If not already done, install the gcloud CLI from -# https://cloud.google.com/sdk/ and run +# https://cloud.google.com/sdk and run # `gcloud beta auth application-default login` +# For more information, see: +# https://developers.google.com/identity/protocols/application-default-credentials # 3. Install the Ruby client library and Application Default Credentials # library by running `gem install google-api-client` and # `gem install googleauth` + require 'googleauth' require 'google/apis/vision_v1' require 'json' service = Google::Apis::VisionV1::VisionService.new -# Use Application Default Credentials for authentication when running locally. -# For more information, see: -# https://developers.google.com/identity/protocols/application-default-credentials service.authorization = \ Google::Auth.get_application_default(['https://www.googleapis.com/auth/cloud-platform']) - +# TODO: Assign values to desired members of `request_body`: request_body = Google::Apis::VisionV1::BatchAnnotateImagesRequest.new -# TODO: Assign values to desired members of the `request_body` object. - -# Perform the call response = service.annotate_image(request_body) # TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/sqladmin.v1beta4.json.overrides b/src/test/java/com/google/api/codegen/testdata/discoveries/sqladmin.v1beta4.json.overrides index fa5ba58a45..7bb1352870 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/sqladmin.v1beta4.json.overrides +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/sqladmin.v1beta4.json.overrides @@ -23,5 +23,8 @@ "isPageStreaming": false } } + }, + "ruby": { + "apiTypeName": "SQLAdminService" } } diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/storagetransfer.v1.json.overrides b/src/test/java/com/google/api/codegen/testdata/discoveries/storagetransfer.v1.json.overrides index d7196d78f4..2d99c24d9a 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/storagetransfer.v1.json.overrides +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/storagetransfer.v1.json.overrides @@ -2,7 +2,7 @@ "go": { "methods": { "storagetransfer.getGoogleServiceAccount": { - "nameComponents": ["v1", "getGoogleServiceAccount"] + "nameComponents": ["V1", "GetGoogleServiceAccount"] } } },