From f77724ff7407c3eca2a6ef1f8ebab08a1669f868 Mon Sep 17 00:00:00 2001 From: Sai Cheemalapati Date: Mon, 7 Nov 2016 11:16:31 -0800 Subject: [PATCH] Refactor PHP discovery snippetgen for MVVM (#714) --- .../MainDiscoveryProviderFactory.java | 14 +- .../ApiaryConfigToSampleConfigConverter.java | 1 + .../discovery/config/SampleConfig.java | 11 + .../config/php/PhpTypeNameGenerator.java | 71 + .../config/ruby/RubyTypeNameGenerator.java | 10 - .../discovery/transformer/SampleNamer.java | 4 +- .../JavaSampleMethodToViewTransformer.java | 2 +- .../nodejs/NodeJSSampleTypeNameConverter.java | 7 +- .../php/PhpSampleMethodToViewTransformer.java | 175 + .../transformer/php/PhpSampleNamer.java | 31 + .../php/PhpSampleTypeNameConverter.java | 105 + .../discovery/viewmodel/SampleView.java | 6 + .../api/codegen/util/php/PhpTypeTable.java | 76 + .../api/codegen/util/ruby/RubyTypeTable.java | 2 +- .../com/google/api/codegen/php/sample.snip | 146 + .../java_storagetransfer.v1.json.baseline | 6 +- .../php_adexchangebuyer.v1.4.json.baseline | 533 +-- .../php/php_appengine.v1beta5.json.baseline | 340 +- .../php/php_bigquery.v2.json.baseline | 372 +- .../php/php_cloudbilling.v1.json.baseline | 83 +- .../php/php_clouddebugger.v2.json.baseline | 109 +- .../php_cloudmonitoring.v2beta2.json.baseline | 121 +- .../php_cloudresourcemanager.v1.json.baseline | 234 +- .../php/php_cloudtrace.v1.json.baseline | 47 +- .../php_clouduseraccounts.beta.json.baseline | 274 +- .../php/php_compute.v1.json.baseline | 3969 ++++++----------- .../php/php_container.v1.json.baseline | 209 +- .../php/php_dataflow.v1b3.json.baseline | 206 +- .../php/php_datastore.v1.json.baseline | 96 +- .../php_deploymentmanager.v2.json.baseline | 298 +- .../php/php_dfareporting.v2.6.json.baseline | 3129 +++++-------- .../discoveries/php/php_dns.v1.json.baseline | 155 +- .../php/php_logging.v2beta1.json.baseline | 256 +- .../php/php_prediction.v1.6.json.baseline | 130 +- .../php/php_pubsub.v1.json.baseline | 395 +- ...p_replicapoolupdater.v1beta1.json.baseline | 185 +- .../php/php_sqladmin.v1beta4.json.baseline | 664 +-- .../php/php_storage.v1.json.baseline | 614 +-- .../php/php_storagetransfer.v1.json.baseline | 164 +- .../php/php_taskqueue.v1beta2.json.baseline | 142 +- .../php/php_translate.v2.json.baseline | 27 +- .../php/php_vision.v1.json.baseline | 11 +- .../ruby/ruby_sqladmin.v1beta4.json.baseline | 10 +- .../sqladmin.v1beta4.json.overrides | 14 +- .../discoveries/storage.v1.json.overrides | 82 + .../storagetransfer.v1.json.overrides | 24 +- 46 files changed, 5248 insertions(+), 8312 deletions(-) create mode 100644 src/main/java/com/google/api/codegen/discovery/config/php/PhpTypeNameGenerator.java create mode 100644 src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleMethodToViewTransformer.java create mode 100644 src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleNamer.java create mode 100644 src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleTypeNameConverter.java create mode 100644 src/main/resources/com/google/api/codegen/php/sample.snip 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 f2af591255..116c98e65f 100644 --- a/src/main/java/com/google/api/codegen/discovery/MainDiscoveryProviderFactory.java +++ b/src/main/java/com/google/api/codegen/discovery/MainDiscoveryProviderFactory.java @@ -24,14 +24,14 @@ 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.php.PhpTypeNameGenerator; 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.php.PhpSampleMethodToViewTransformer; 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; @@ -63,12 +63,14 @@ public class MainDiscoveryProviderFactory implements DiscoveryProviderFactory { GO, GoSampleMethodToViewTransformer.class, JAVA, JavaSampleMethodToViewTransformer.class, NODEJS, NodeJSSampleMethodToViewTransformer.class, + PHP, PhpSampleMethodToViewTransformer.class, RUBY, RubySampleMethodToViewTransformer.class); private static final Map> TYPE_NAME_GENERATOR_MAP = ImmutableMap.of( GO, GoTypeNameGenerator.class, JAVA, JavaTypeNameGenerator.class, NODEJS, NodeJSTypeNameGenerator.class, + PHP, PhpTypeNameGenerator.class, RUBY, RubyTypeNameGenerator.class); public static DiscoveryProvider defaultCreate( @@ -90,14 +92,6 @@ public static DiscoveryProvider defaultCreate( .setSnippetFileName(id + "/" + DEFAULT_SNIPPET_FILE) .build(); - } else if (id.equals(PHP)) { - return CommonDiscoveryProvider.newBuilder() - .setContext(new PhpDiscoveryContext(service, apiaryConfig)) - .setSnippetSetRunner( - new PhpSnippetSetRunner(SnippetSetRunner.SNIPPET_RESOURCE_ROOT)) - .setSnippetFileName(id + "/" + DEFAULT_SNIPPET_FILE) - .build(); - } else if (id.equals(PYTHON)) { return CommonDiscoveryProvider.newBuilder() .setContext(new PythonDiscoveryContext(service, apiaryConfig)) 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 d7e45692e6..70ffdd7ce0 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 @@ -66,6 +66,7 @@ public SampleConfig convert() { String apiTypeName = typeNameGenerator.getApiTypeName(apiaryConfig.getServiceCanonicalName()); return SampleConfig.newBuilder() .apiTitle(apiaryConfig.getApiTitle()) + .apiCanonicalName(apiaryConfig.getServiceCanonicalName()) .apiName(apiName) .apiVersion(apiVersion) .apiTypeName(apiTypeName) diff --git a/src/main/java/com/google/api/codegen/discovery/config/SampleConfig.java b/src/main/java/com/google/api/codegen/discovery/config/SampleConfig.java index f32fec729b..ca0926efb3 100644 --- a/src/main/java/com/google/api/codegen/discovery/config/SampleConfig.java +++ b/src/main/java/com/google/api/codegen/discovery/config/SampleConfig.java @@ -60,6 +60,14 @@ public abstract class SampleConfig { @JsonProperty("apiTitle") public abstract String apiTitle(); + /** + * Returns the API's canonical name. + * + *

For example: "Ad Exchange Buyer" + */ + @JsonProperty("apiCanonicalName") + public abstract String apiCanonicalName(); + /** * Returns the API's name. * @@ -109,6 +117,9 @@ public abstract static class Builder { @JsonProperty("apiTitle") public abstract Builder apiTitle(String val); + @JsonProperty("apiCanonicalName") + public abstract Builder apiCanonicalName(String val); + @JsonProperty("apiName") public abstract Builder apiName(String val); diff --git a/src/main/java/com/google/api/codegen/discovery/config/php/PhpTypeNameGenerator.java b/src/main/java/com/google/api/codegen/discovery/config/php/PhpTypeNameGenerator.java new file mode 100644 index 0000000000..4b3e06bcbf --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/config/php/PhpTypeNameGenerator.java @@ -0,0 +1,71 @@ +/* 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.php; + +import com.google.api.codegen.discovery.config.TypeNameGenerator; +import com.google.api.codegen.util.Name; +import com.google.common.base.Joiner; +import com.google.common.collect.ImmutableSet; +import java.util.ArrayList; +import java.util.List; + +public class PhpTypeNameGenerator extends TypeNameGenerator { + + /** + * Set of method names that must have the previous name components as upper-camel suffixes. + * + *

For example: "foo.bar.list" to "foo.bar.listFooBar" + */ + ImmutableSet RENAMED_METHODS = ImmutableSet.of("list", "clone"); + + @Override + public String stringDelimiter() { + return "'"; + } + + @Override + public String getApiTypeName(String apiName) { + return "Google_Service_" + apiName.replace(" ", ""); + } + + @Override + public List getMethodNameComponents(List nameComponents) { + ArrayList out = new ArrayList<>(); + + nameComponents = super.getMethodNameComponents(nameComponents); + String verb = nameComponents.remove(nameComponents.size() - 1); // Pop the last element. + if (RENAMED_METHODS.contains(verb)) { + for (String s : nameComponents) { + verb += Name.lowerCamel(s).toUpperCamel(); + } + } + // If there are multiple resources before the verb, they're joined on '_'. + // Ex: "$service->billingAccounts_projects->listBillingAccountsProjects" + if (nameComponents.size() > 1) { + out.add(Joiner.on('_').join(nameComponents)); + } else if (nameComponents.size() == 1) { + out.add(nameComponents.get(0)); + } + out.add(verb); + return out; + } + + @Override + public String getMessageTypeName(String messageTypeName) { + // Avoid cases like "DatasetList.Datasets" + String pieces[] = messageTypeName.split("\\."); + return pieces[pieces.length - 1]; + } +} 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 index b4bae15fd1..c75b97e725 100644 --- 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 @@ -14,7 +14,6 @@ */ 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; @@ -89,15 +88,6 @@ 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" diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/SampleNamer.java b/src/main/java/com/google/api/codegen/discovery/transformer/SampleNamer.java index 3cfa5102ff..0e35933128 100644 --- a/src/main/java/com/google/api/codegen/discovery/transformer/SampleNamer.java +++ b/src/main/java/com/google/api/codegen/discovery/transformer/SampleNamer.java @@ -27,8 +27,8 @@ public SampleNamer(NameFormatter nameFormatter) { } /** Returns the application name of the sample. */ - public String getSampleApplicationName(String apiTypeName) { - return "Google-" + apiTypeName + "Sample/0.1"; + public String getSampleApplicationName(String apiCanonicalName) { + return "Google-" + apiCanonicalName.replace(" ", "") + "Sample/0.1"; } /** Returns the class name of the sample. */ diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleMethodToViewTransformer.java b/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleMethodToViewTransformer.java index e65f3a9dab..b576f43279 100644 --- a/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleMethodToViewTransformer.java +++ b/src/main/java/com/google/api/codegen/discovery/transformer/java/JavaSampleMethodToViewTransformer.java @@ -117,7 +117,7 @@ private SampleView createSampleView(SampleTransformerContext context) { .apiTitle(config.apiTitle()) .apiName(config.apiName()) .apiVersion(config.apiVersion()) - .appName(namer.getSampleApplicationName(config.apiTypeName())) + .appName(namer.getSampleApplicationName(config.apiCanonicalName())) .className(namer.getSampleClassName(config.apiTypeName())) .imports(imports) .auth(createSampleAuthView(context)) 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 f1ae3c52f7..105719235b 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,7 +26,6 @@ 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") @@ -41,7 +40,6 @@ 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, "''") @@ -80,6 +78,9 @@ public TypeName getTypeName(TypeInfo typeInfo) { @Override public TypeName getTypeNameForElementType(TypeInfo typeInfo) { + if (typeInfo.kind() == Field.Kind.TYPE_UNKNOWN) { + return new TypeName("Object"); + } String primitiveTypeName = PRIMITIVE_TYPE_MAP.get(typeInfo.kind()); if (primitiveTypeName != null) { return new TypeName(primitiveTypeName); @@ -90,7 +91,7 @@ public TypeName getTypeNameForElementType(TypeInfo typeInfo) { @Override public TypedValue getZeroValue(TypeInfo typeInfo) { // Don't call getTypeName; we don't need to import these. - if (typeInfo.isMap()) { + if (typeInfo.isMap() || typeInfo.kind() == Field.Kind.TYPE_UNKNOWN) { return TypedValue.create(new TypeName("Object"), "{}"); } if (typeInfo.isArray()) { diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleMethodToViewTransformer.java b/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleMethodToViewTransformer.java new file mode 100644 index 0000000000..661d8cccb5 --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleMethodToViewTransformer.java @@ -0,0 +1,175 @@ +/* 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.php; + +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.php.PhpTypeTable; +import com.google.api.codegen.viewmodel.ViewModel; +import com.google.protobuf.Method; +import java.util.ArrayList; +import java.util.List; + +public class PhpSampleMethodToViewTransformer implements SampleMethodToViewTransformer { + + private static final String TEMPLATE_FILENAME = "php/sample.snip"; + + public PhpSampleMethodToViewTransformer() {} + + @Override + public ViewModel transform(Method method, SampleConfig config) { + SampleTypeTable typeTable = + new SampleTypeTable( + new PhpTypeTable(""), new PhpSampleTypeNameConverter(config.apiTypeName())); + SampleNamer namer = new PhpSampleNamer(); + 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(PhpTypeTable.RESERVED_IDENTIFIER_SET); + + SampleView.Builder builder = SampleView.newBuilder(); + + String serviceVarName = symbolTable.getNewSymbol(namer.getServiceVarName(config.apiTypeName())); + String serviceTypeName = typeTable.getServiceTypeName(config.apiTypeName()).getNickname(); + + 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()) { + SampleFieldView sampleFieldView = + SampleFieldView.newBuilder() + .name(namer.localVarName(Name.lowerCamel(field.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())); + } + + String optParamsVarName = ""; + if (methodInfo.isPageStreaming() || methodInfo.hasMediaDownload()) { + optParamsVarName = namer.localVarName(Name.lowerCamel("optParams")); + fieldVarNames.add(optParamsVarName); + } + + return builder + .templateFileName(TEMPLATE_FILENAME) + .outputPath(context.getMethodName() + ".frag.php") + .apiTitle(config.apiTitle()) + .apiName(config.apiName()) + .apiVersion(config.apiVersion()) + .appName(namer.getSampleApplicationName(config.apiCanonicalName())) + .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()) + .clientVarName(namer.localVarName(Name.lowerCamel("client"))) + .optParamsVarName(optParamsVarName) + .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/php/PhpSampleNamer.java b/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleNamer.java new file mode 100644 index 0000000000..840e234d54 --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleNamer.java @@ -0,0 +1,31 @@ +/* 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.php; + +import com.google.api.codegen.discovery.transformer.SampleNamer; +import com.google.api.codegen.util.Name; +import com.google.api.codegen.util.php.PhpNameFormatter; + +public class PhpSampleNamer extends SampleNamer { + + public PhpSampleNamer() { + super(new PhpNameFormatter()); + } + + @Override + public String getServiceVarName(String apiTypeName) { + return localVarName(Name.lowerCamel("service")); + } +} diff --git a/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleTypeNameConverter.java b/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleTypeNameConverter.java new file mode 100644 index 0000000000..caeb34ec79 --- /dev/null +++ b/src/main/java/com/google/api/codegen/discovery/transformer/php/PhpSampleTypeNameConverter.java @@ -0,0 +1,105 @@ +/* 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.php; + +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; + +public class PhpSampleTypeNameConverter implements SampleTypeNameConverter { + + /** A map from primitive types in proto to PHP counterparts. */ + private static final ImmutableMap PRIMITIVE_TYPE_MAP = + ImmutableMap.builder() + .put(Field.Kind.TYPE_BOOL, "Boolean") + .put(Field.Kind.TYPE_INT32, "Integer") + .put(Field.Kind.TYPE_INT64, "String") + .put(Field.Kind.TYPE_UINT32, "Integer") + .put(Field.Kind.TYPE_UINT64, "String") + .put(Field.Kind.TYPE_FLOAT, "Float") + .put(Field.Kind.TYPE_DOUBLE, "Float") + .put(Field.Kind.TYPE_STRING, "String") + .put(Field.Kind.TYPE_ENUM, "String") + .build(); + + /** A map from primitive types in proto to zero value in PHP */ + private static final ImmutableMap PRIMITIVE_ZERO_VALUE = + ImmutableMap.builder() + .put(Field.Kind.TYPE_BOOL, "false") + .put(Field.Kind.TYPE_INT32, "0") + .put(Field.Kind.TYPE_INT64, "'0'") + .put(Field.Kind.TYPE_UINT32, "0") + .put(Field.Kind.TYPE_UINT64, "'0'") + .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(); + + private final String apiTypeName; + + public PhpSampleTypeNameConverter(String apiTypeName) { + this.apiTypeName = apiTypeName; + } + + @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(apiTypeName + "_" + 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) { + // Don't call getTypeName; we don't need to import these. + if (typeInfo.isMap()) { + return TypedValue.create(new TypeName("Array"), "[]"); + } + if (typeInfo.isArray()) { + return TypedValue.create(new TypeName("Array"), "[]"); + } + if (PRIMITIVE_ZERO_VALUE.containsKey(typeInfo.kind())) { + return TypedValue.create( + new TypeName(PRIMITIVE_TYPE_MAP.get(typeInfo.kind())), + PRIMITIVE_ZERO_VALUE.get(typeInfo.kind())); + } + if (typeInfo.isMessage()) { + return TypedValue.create(new TypeName("Object"), "new stdClass()"); + } + 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 f3803381e6..4223c871be 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 @@ -118,6 +118,10 @@ public String resourceRoot() { @Nullable public abstract String contextVarName(); + // PHP specific section... + @Nullable + public abstract String optParamsVarName(); + // Ruby specific section... @Nullable public abstract String serviceRequirePath(); @@ -204,6 +208,8 @@ public abstract static class Builder { public abstract Builder contextVarName(String val); + public abstract Builder optParamsVarName(String val); + public abstract Builder serviceRequirePath(String val); public abstract Builder serviceTypeNamespace(String val); diff --git a/src/main/java/com/google/api/codegen/util/php/PhpTypeTable.java b/src/main/java/com/google/api/codegen/util/php/PhpTypeTable.java index 4f6b797d7e..c884280581 100644 --- a/src/main/java/com/google/api/codegen/util/php/PhpTypeTable.java +++ b/src/main/java/com/google/api/codegen/util/php/PhpTypeTable.java @@ -19,6 +19,7 @@ import com.google.api.codegen.util.TypeAlias; import com.google.api.codegen.util.TypeName; import com.google.api.codegen.util.TypeTable; +import com.google.common.collect.ImmutableSet; import java.util.Map; import java.util.TreeMap; @@ -100,4 +101,79 @@ public String getAndSaveNicknameForInnerType( String containerFullName, String innerTypeShortName) { return dynamicTypeTable.getAndSaveNicknameForInnerType(containerFullName, innerTypeShortName); } + + /** + * : A set of PHP 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( + "abstract", + "and", + "array", + "as", + "break", + "callable", + "case", + "catch", + "class", + "clone", + "const", + "continue", + "declare", + "default", + "die", + "do", + "echo", + "else", + "elseif", + "empty", + "enddeclare", + "endfor", + "endforeach", + "endif", + "endswitch", + "endwhile", + "eval", + "exit", + "extends", + "final", + "finally", + "for", + "foreach", + "function", + "global", + "goto", + "if", + "implements", + "include", + "include_once", + "instanceof", + "insteadof", + "interface", + "isset", + "list", + "namespace", + "new", + "or", + "print", + "private", + "protected", + "public", + "require", + "require_once", + "return", + "static", + "switch", + "throw", + "trait", + "try", + "unset", + "use", + "var", + "while", + "xor", + "yield") + .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 2a0f8a6227..75e6e799a2 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 @@ -91,7 +91,7 @@ public String getAndSaveNicknameForInnerType( } /** - * : A set of ruby keywords and built-ins. keywords: + * : 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 = diff --git a/src/main/resources/com/google/api/codegen/php/sample.snip b/src/main/resources/com/google/api/codegen/php/sample.snip new file mode 100644 index 0000000000..df8bd5c172 --- /dev/null +++ b/src/main/resources/com/google/api/codegen/php/sample.snip @@ -0,0 +1,146 @@ +@snippet generate(class) + setApplicationName('{@class.appName}'); + ${@class.clientVarName}->useApplicationDefaultCredentials(); + ${@class.clientVarName}->addScope('https://www.googleapis.com/auth/cloud-platform'); + @case "OAUTH_3L" + ${@class.clientVarName} = getClient(); + @default + ${@class.clientVarName} = new Google_Client(); + ${@class.clientVarName}->setApplicationName('{@class.appName}'); + ${@class.clientVarName}->setDeveloperKey(''); // TODO: Update placeholder with desired API key. + @end + + ${@class.serviceVarName} = new {@class.serviceTypeName}(${@class.clientVarName}); + + @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 properties of `{@class.requestBodyVarName}`. Only assigned + // properties will be changed: + @else + // TODO: Assign values to desired properties of `{@class.requestBodyVarName}`: + @end + + ${@class.requestBodyVarName} = new {@class.requestBodyTypeName}(); + + @end + @if class.hasMediaUpload + // TODO: Add desired media content for upload. For more information, see: + // https://developers.google.com/api-client-library/php/guide/media_upload + + @end + @if class.optParamsVarName + ${@class.optParamsVarName} = []; + @end + @if class.hasMediaDownload + + // TODO: To download media content, use: + // + // ${@class.optParamsVarName}['alt'] = 'media'; + + @end + @if class.isPageStreaming + do { + ${@class.responseVarName} = ${@class.serviceVarName}->{@callChain(class.methodNameComponents)}({@paramList(class.fieldVarNames)}); + + @if class.pageStreaming.isResourceMap + foreach (${@class.responseVarName}['{@class.pageStreaming.resourceFieldName}'] as ${@class.pageStreaming.resourceKeyVarName} => ${@class.pageStreaming.resourceValueVarName}) { + // TODO: Change code below to process each ({@class.pageStreaming.resourceKeyVarName} => {@class.pageStreaming.resourceValueVarName}) element: + echo '

', ${@class.pageStreaming.resourceKeyVarName}, ' => ', var_export(${@class.pageStreaming.resourceValueVarName}, true), '
', "\n"; + } + @else + foreach (${@class.responseVarName}['{@class.pageStreaming.resourceFieldName}'] as ${@class.pageStreaming.resourceVarName}) { + // TODO: Change code below to process each `{@class.pageStreaming.resourceVarName}` resource: + echo '
', var_export(${@class.pageStreaming.resourceVarName}, true), '
', "\n"; + } + @end + + ${@class.optParamsVarName()}['pageToken'] = ${@class.responseVarName}->getNextPageToken(); + } while (${@class.optParamsVarName}['pageToken']); + @else + @if class.hasResponse + ${@class.responseVarName} = ${@class.serviceVarName}->{@callChain(class.methodNameComponents)}({@paramList(class.fieldVarNames)}); + + // TODO: Change code below to process the `{@class.responseVarName}` object: + echo '
', var_export(${@class.responseVarName}, true), '
', "\n"; + @else + ${@class.serviceVarName}->{@callChain(class.methodNameComponents)}({@paramList(class.fieldVarNames)}); + @end + @end + @if class.auth.type == "OAUTH_3L" + + {@getClientFunc(class)} + @end + ?> +@end + +@private getClientFunc(class) + function getClient() { + // 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 + return null; + } +@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/java/java_storagetransfer.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/java/java_storagetransfer.v1.json.baseline index de3be61cd1..c30e42ccb6 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/java/java_storagetransfer.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/java/java_storagetransfer.v1.json.baseline @@ -27,12 +27,8 @@ import java.util.Arrays; public class StoragetransferExample { public static void main(String args[]) throws IOException, GeneralSecurityException { - // The ID of the Google Developers Console project that the Google service account is associated with. - // Required. - String projectId = ""; // TODO: Update placeholder value. - Storagetransfer storagetransferService = createStoragetransferService(); - Storagetransfer.GoogleServiceAccounts.Get request = storagetransferService.googleServiceAccounts().get(projectId); + Storagetransfer.V1.GetGoogleServiceAccount request = storagetransferService.v1().getGoogleServiceAccount(); GoogleServiceAccount response = request.execute(); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_adexchangebuyer.v1.4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_adexchangebuyer.v1.4.json.baseline index 0698158d4b..6c780d2464 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_adexchangebuyer.v1.4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_adexchangebuyer.v1.4.json.baseline @@ -17,12 +17,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The account id -$id = 0; - +$id = 0; // TODO: Update placeholder value. $response = $service->accounts->get($id); @@ -30,10 +26,10 @@ $response = $service->accounts->get($id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -56,17 +52,16 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - $response = $service->accounts->listAccounts(); // TODO: Change code below to process the `response` object: echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listAccounts` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -89,16 +84,12 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `patch` method: - // The account id -$id = 0; - +$id = 0; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_AdExchangeBuyer_Account(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->accounts->patch($id, $requestBody); @@ -106,10 +97,10 @@ $response = $service->accounts->patch($id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -132,16 +123,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // The account id -$id = 0; - +$id = 0; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_Account(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->accounts->update($id, $requestBody); @@ -149,10 +135,10 @@ $response = $service->accounts->update($id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -175,12 +161,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The account id. -$accountId = 0; - +$accountId = 0; // TODO: Update placeholder value. $response = $service->billingInfo->get($accountId); @@ -188,10 +170,10 @@ $response = $service->billingInfo->get($accountId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -214,17 +196,16 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - $response = $service->billingInfo->listBillingInfo(); // TODO: Change code below to process the `response` object: echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listBillingInfo` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -247,15 +228,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The account id to get the budget information for. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The billing id to get the budget information for. -$billingId = '0'; - +$billingId = '0'; // TODO: Update placeholder value. $response = $service->budget->get($accountId, $billingId); @@ -263,10 +240,10 @@ $response = $service->budget->get($accountId, $billingId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -289,19 +266,15 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // The account id associated with the budget being updated. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The billing id associated with the budget being updated. -$billingId = '0'; - +$billingId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_AdExchangeBuyer_Budget(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->budget->patch($accountId, $billingId, $requestBody); @@ -309,10 +282,10 @@ $response = $service->budget->patch($accountId, $billingId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -335,19 +308,14 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // The account id associated with the budget being updated. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The billing id associated with the budget being updated. -$billingId = '0'; - +$billingId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_Budget(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->budget->update($accountId, $billingId, $requestBody); @@ -355,10 +323,10 @@ $response = $service->budget->update($accountId, $billingId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -381,26 +349,22 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `addDeal` method: - // The id for the account that will serve this creative. -$accountId = 0; +$accountId = 0; // TODO: Update placeholder value. // The buyer-specific id for this creative. -$buyerCreativeId = '{MY-BUYER-CREATIVE-ID}'; +$buyerCreativeId = ''; // TODO: Update placeholder value. // The id of the deal id to associate with this creative. -$dealId = '0'; - +$dealId = '0'; // TODO: Update placeholder value. $service->creatives->addDeal($accountId, $buyerCreativeId, $dealId); function getClient() { - // 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 `addDeal` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -423,15 +387,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The id for the account that will serve this creative. -$accountId = 0; +$accountId = 0; // TODO: Update placeholder value. // The buyer-specific id for this creative. -$buyerCreativeId = '{MY-BUYER-CREATIVE-ID}'; - +$buyerCreativeId = ''; // TODO: Update placeholder value. $response = $service->creatives->get($accountId, $buyerCreativeId); @@ -439,10 +399,10 @@ $response = $service->creatives->get($accountId, $buyerCreativeId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -465,10 +425,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_Creative(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creatives->insert($requestBody); @@ -476,10 +434,10 @@ $response = $service->creatives->insert($requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -502,8 +460,7 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -$optParams = array(); +$optParams = []; do { $response = $service->creatives->listCreatives($optParams); @@ -516,10 +473,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listCreatives` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -542,15 +499,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `listDeals` method: - // The id for the account that will serve this creative. -$accountId = 0; +$accountId = 0; // TODO: Update placeholder value. // The buyer-specific id for this creative. -$buyerCreativeId = '{MY-BUYER-CREATIVE-ID}'; - +$buyerCreativeId = ''; // TODO: Update placeholder value. $response = $service->creatives->listDeals($accountId, $buyerCreativeId); @@ -558,10 +511,10 @@ $response = $service->creatives->listDeals($accountId, $buyerCreativeId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listDeals` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -584,26 +537,22 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `removeDeal` method: - // The id for the account that will serve this creative. -$accountId = 0; +$accountId = 0; // TODO: Update placeholder value. // The buyer-specific id for this creative. -$buyerCreativeId = '{MY-BUYER-CREATIVE-ID}'; +$buyerCreativeId = ''; // TODO: Update placeholder value. // The id of the deal id to disassociate with this creative. -$dealId = '0'; - +$dealId = '0'; // TODO: Update placeholder value. $service->creatives->removeDeal($accountId, $buyerCreativeId, $dealId); function getClient() { - // 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 `removeDeal` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -626,16 +575,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // The proposalId to delete deals from. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_DeleteOrderDealsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->marketplacedeals->delete($proposalId, $requestBody); @@ -643,10 +587,10 @@ $response = $service->marketplacedeals->delete($proposalId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -669,16 +613,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // proposalId for which deals need to be added. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_AddOrderDealsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->marketplacedeals->insert($proposalId, $requestBody); @@ -686,10 +625,10 @@ $response = $service->marketplacedeals->insert($proposalId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -712,13 +651,9 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `listMarketplacedeals` method: - // The proposalId to get deals for. To search across all proposals specify order_id = '-' as part of // the URL. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. $response = $service->marketplacedeals->listMarketplacedeals($proposalId); @@ -726,10 +661,10 @@ $response = $service->marketplacedeals->listMarketplacedeals($proposalId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listMarketplacedeals` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -752,16 +687,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // The proposalId to edit deals on. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_EditAllOrderDealsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->marketplacedeals->update($proposalId, $requestBody); @@ -769,10 +699,10 @@ $response = $service->marketplacedeals->update($proposalId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -795,16 +725,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // The proposalId to add notes for. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_AddOrderNotesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->marketplacenotes->insert($proposalId, $requestBody); @@ -812,10 +737,10 @@ $response = $service->marketplacenotes->insert($proposalId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -838,13 +763,9 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `listMarketplacenotes` method: - // The proposalId to get notes for. To search across all proposals specify order_id = '-' as part of // the URL. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. $response = $service->marketplacenotes->listMarketplacenotes($proposalId); @@ -852,10 +773,10 @@ $response = $service->marketplacenotes->listMarketplacenotes($proposalId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listMarketplacenotes` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -878,24 +799,19 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `updateproposal` method: - // The private auction id to be updated. -$privateAuctionId = '{MY-PRIVATE-AUCTION-ID}'; - +$privateAuctionId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_UpdatePrivateAuctionProposalRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->marketplaceprivateauction->updateproposal($privateAuctionId, $requestBody); function getClient() { - // 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 `updateproposal` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -918,18 +834,14 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `listPerformanceReport` method: - // The account id to get the reports. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The end time of the report in ISO 8601 timestamp format using UTC. -$endDateTime = '{MY-END-DATE-TIME}'; +$endDateTime = ''; // TODO: Update placeholder value. // The start time of the report in ISO 8601 timestamp format using UTC. -$startDateTime = '{MY-START-DATE-TIME}'; - +$startDateTime = ''; // TODO: Update placeholder value. $response = $service->performanceReport->listPerformanceReport($accountId, $endDateTime, $startDateTime); @@ -937,10 +849,10 @@ $response = $service->performanceReport->listPerformanceReport($accountId, $endD echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listPerformanceReport` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -963,23 +875,19 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // The account id to delete the pretargeting config for. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The specific id of the configuration to delete. -$configId = '0'; - +$configId = '0'; // TODO: Update placeholder value. $service->pretargetingConfig->delete($accountId, $configId); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1002,15 +910,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The account id to get the pretargeting config for. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The specific id of the configuration to retrieve. -$configId = '0'; - +$configId = '0'; // TODO: Update placeholder value. $response = $service->pretargetingConfig->get($accountId, $configId); @@ -1018,10 +922,10 @@ $response = $service->pretargetingConfig->get($accountId, $configId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1044,16 +948,11 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // The account id to insert the pretargeting config for. -$accountId = '0'; - +$accountId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_PretargetingConfig(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->pretargetingConfig->insert($accountId, $requestBody); @@ -1061,10 +960,10 @@ $response = $service->pretargetingConfig->insert($accountId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1087,12 +986,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `listPretargetingConfig` method: - // The account id to get the pretargeting configs for. -$accountId = '0'; - +$accountId = '0'; // TODO: Update placeholder value. $response = $service->pretargetingConfig->listPretargetingConfig($accountId); @@ -1100,10 +995,10 @@ $response = $service->pretargetingConfig->listPretargetingConfig($accountId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listPretargetingConfig` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1126,19 +1021,15 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // The account id to update the pretargeting config for. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The specific id of the configuration to update. -$configId = '0'; - +$configId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_AdExchangeBuyer_PretargetingConfig(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->pretargetingConfig->patch($accountId, $configId, $requestBody); @@ -1146,10 +1037,10 @@ $response = $service->pretargetingConfig->patch($accountId, $configId, $requestB echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1172,19 +1063,14 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // The account id to update the pretargeting config for. -$accountId = '0'; +$accountId = '0'; // TODO: Update placeholder value. // The specific id of the configuration to update. -$configId = '0'; - +$configId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_PretargetingConfig(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->pretargetingConfig->update($accountId, $configId, $requestBody); @@ -1192,10 +1078,10 @@ $response = $service->pretargetingConfig->update($accountId, $configId, $request echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1218,12 +1104,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The id for the product to get the head revision for. -$productId = '{MY-PRODUCT-ID}'; - +$productId = ''; // TODO: Update placeholder value. $response = $service->products->get($productId); @@ -1231,10 +1113,10 @@ $response = $service->products->get($productId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1257,17 +1139,16 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - $response = $service->products->search(); // TODO: Change code below to process the `response` object: echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1290,12 +1171,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // Id of the proposal to retrieve. -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. $response = $service->proposals->get($proposalId); @@ -1303,10 +1180,10 @@ $response = $service->proposals->get($proposalId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1329,10 +1206,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_CreateOrdersRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->proposals->insert($requestBody); @@ -1340,10 +1215,10 @@ $response = $service->proposals->insert($requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1366,25 +1241,21 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // The proposal id to update. -$proposalId = '{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. -$revisionNumber = '0'; +$proposalId = ''; // 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. -$updateAction = '{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. +$revisionNumber = '0'; // 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. +$updateAction = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_AdExchangeBuyer_Proposal(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->proposals->patch($proposalId, $revisionNumber, $updateAction, $requestBody); @@ -1392,10 +1263,10 @@ $response = $service->proposals->patch($proposalId, $revisionNumber, $updateActi echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1418,17 +1289,16 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - $response = $service->proposals->search(); // TODO: Change code below to process the `response` object: echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1451,20 +1321,16 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `setupcomplete` method: - // The proposal id for which the setup is complete -$proposalId = '{MY-PROPOSAL-ID}'; - +$proposalId = ''; // TODO: Update placeholder value. $service->proposals->setupcomplete($proposalId); function getClient() { - // 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 `setupcomplete` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1487,25 +1353,20 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // The proposal id to update. -$proposalId = '{MY-PROPOSAL-ID}'; +$proposalId = ''; // 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. -$revisionNumber = '0'; - -// The proposed action to take on the proposal. This field is required and it must be set when updating -// a proposal. -$updateAction = '{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. +$revisionNumber = '0'; // 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. +$updateAction = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_AdExchangeBuyer_Proposal(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->proposals->update($proposalId, $revisionNumber, $updateAction, $requestBody); @@ -1513,10 +1374,10 @@ $response = $service->proposals->update($proposalId, $revisionNumber, $updateAct echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } @@ -1539,12 +1400,8 @@ $client = getClient(); $service = new Google_Service_AdExchangeBuyer($client); - -// TODO: Change placeholder below to desired parameter value for the `listPubprofiles` method: - // The accountId of the publisher to get profiles for. -$accountId = 0; - +$accountId = 0; // TODO: Update placeholder value. $response = $service->pubprofiles->listPubprofiles($accountId); @@ -1552,10 +1409,10 @@ $response = $service->pubprofiles->listPubprofiles($accountId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listPubprofiles` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/adexchange.buyer return null; } diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_appengine.v1beta5.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_appengine.v1beta5.json.baseline index 831d38c45e..ce32ecd28d 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_appengine.v1beta5.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_appengine.v1beta5.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,10 +26,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Appengine_Application(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->apps->create($requestBody); @@ -46,8 +43,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -55,9 +54,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -65,12 +61,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // Part of `name`. Name of the application to get. Example: `apps/myapp`. -$appsId = '{MY-APPS-ID}'; - +$appsId = ''; // TODO: Update placeholder value. $response = $service->apps->get($appsId); @@ -86,8 +78,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -95,9 +89,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -105,15 +96,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Part of `name`. Resource name for the location. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$locationsId = '{MY-LOCATIONS-ID}'; - +$locationsId = ''; // TODO: Update placeholder value. $response = $service->apps_locations->get($appsId, $locationsId); @@ -129,8 +116,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -138,9 +127,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -148,14 +134,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholder below to desired parameter value for the `listAppsLocations` method: - // Part of `name`. The resource that owns the locations collection, if applicable. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->apps_locations->listAppsLocations($appsId, $optParams); @@ -176,8 +158,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -185,9 +169,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -195,15 +176,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Part of `name`. The name of the operation resource. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$operationsId = '{MY-OPERATIONS-ID}'; - +$operationsId = ''; // TODO: Update placeholder value. $response = $service->apps_operations->get($appsId, $operationsId); @@ -219,8 +196,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -228,9 +207,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -238,14 +214,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholder below to desired parameter value for the `listAppsOperations` method: - // Part of `name`. The name of the operation collection. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->apps_operations->listAppsOperations($appsId, $optParams); @@ -266,8 +238,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -275,9 +249,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -285,16 +256,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholder below to desired parameter value for the `patch` method: - // Part of `name`. Name of the application to update. Example: `apps/myapp`. -$appsId = '{MY-APPS-ID}'; - +$appsId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Appengine_Application(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->apps->patch($appsId, $requestBody); @@ -310,8 +277,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -319,9 +288,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -329,15 +295,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; - +$servicesId = ''; // TODO: Update placeholder value. $response = $service->apps_services->delete($appsId, $servicesId); @@ -353,8 +315,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -362,9 +326,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -372,15 +333,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; - +$servicesId = ''; // TODO: Update placeholder value. $response = $service->apps_services->get($appsId, $servicesId); @@ -396,8 +353,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -405,9 +364,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -415,20 +371,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholder below to desired parameter value for the `listAppsServices` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp`. -$appsId = '{MY-APPS-ID}'; - +$appsId = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->apps_services->listAppsServices($appsId, $optParams); - foreach ($response['services'] as $service) { - // TODO: Change code below to process each `service` resource: - echo '
', var_export($service, true), '
', "\n"; + foreach ($response['services'] as $service2) { + // TODO: Change code below to process each `service2` resource: + echo '
', var_export($service2, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -443,8 +395,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -452,9 +406,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -462,19 +413,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; - +$servicesId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Appengine_Service(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->apps_services->patch($appsId, $servicesId, $requestBody); @@ -490,8 +437,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -499,9 +448,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -509,19 +455,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `create` method: - // Part of `name`. Name of the resource to update. For example: "apps/myapp/services/default". -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; - +$servicesId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Appengine_Version(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->apps_services_versions->create($appsId, $servicesId, $requestBody); @@ -537,8 +478,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -546,9 +489,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -556,18 +496,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; - +$versionsId = ''; // TODO: Update placeholder value. $response = $service->apps_services_versions->delete($appsId, $servicesId, $versionsId); @@ -583,8 +519,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -592,9 +530,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -602,18 +537,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; - +$versionsId = ''; // TODO: Update placeholder value. $response = $service->apps_services_versions->get($appsId, $servicesId, $versionsId); @@ -629,8 +560,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -638,9 +571,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -648,26 +578,21 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `debug` method: - // Part of `name`. Name of the resource requested. Example: // `apps/myapp/services/default/versions/v1/instances/instance-1`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; +$versionsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$instancesId = '{MY-INSTANCES-ID}'; - +$instancesId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Appengine_DebugInstanceRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->apps_services_versions_instances->debug($appsId, $servicesId, $versionsId, $instancesId, $requestBody); @@ -683,8 +608,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -692,9 +619,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -702,22 +626,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Part of `name`. Name of the resource requested. For example: // "apps/myapp/services/default/versions/v1/instances/instance-1". -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; +$versionsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$instancesId = '{MY-INSTANCES-ID}'; - +$instancesId = ''; // TODO: Update placeholder value. $response = $service->apps_services_versions_instances->delete($appsId, $servicesId, $versionsId, $instancesId); @@ -733,8 +653,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -742,9 +664,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -752,22 +671,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Part of `name`. Name of the resource requested. Example: // `apps/myapp/services/default/versions/v1/instances/instance-1`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; +$versionsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$instancesId = '{MY-INSTANCES-ID}'; - +$instancesId = ''; // TODO: Update placeholder value. $response = $service->apps_services_versions_instances->get($appsId, $servicesId, $versionsId, $instancesId); @@ -783,8 +698,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -792,9 +709,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -802,20 +716,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `listAppsServicesVersionsInstances` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default/versions/v1`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; +$versionsId = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->apps_services_versions_instances->listAppsServicesVersionsInstances($appsId, $servicesId, $versionsId, $optParams); @@ -836,8 +746,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -845,9 +757,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -855,17 +764,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `listAppsServicesVersions` method: - // Part of `name`. Name of the resource requested. Example: `apps/myapp/services/default`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; - +$servicesId = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->apps_services_versions->listAppsServicesVersions($appsId, $servicesId, $optParams); @@ -886,8 +791,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -895,9 +802,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-AppengineSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -905,22 +809,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Appengine($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Part of `name`. Name of the resource to update. Example: `apps/myapp/services/default/versions/1`. -$appsId = '{MY-APPS-ID}'; +$appsId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$servicesId = '{MY-SERVICES-ID}'; +$servicesId = ''; // TODO: Update placeholder value. // Part of `name`. See documentation of `appsId`. -$versionsId = '{MY-VERSIONS-ID}'; - +$versionsId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Appengine_Version(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->apps_services_versions->patch($appsId, $servicesId, $versionsId, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_bigquery.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_bigquery.v2.json.baseline index b1d2983b15..cb910bb968 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_bigquery.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_bigquery.v2.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,15 +26,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID of the dataset being deleted -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of dataset being deleted -$datasetId = '{MY-DATASET-ID}'; - +$datasetId = ''; // TODO: Update placeholder value. $service->datasets->delete($projectId, $datasetId); ?> @@ -48,8 +43,10 @@ $service->datasets->delete($projectId, $datasetId); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -57,9 +54,6 @@ $service->datasets->delete($projectId, $datasetId); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -67,15 +61,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID of the requested dataset -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the requested dataset -$datasetId = '{MY-DATASET-ID}'; - +$datasetId = ''; // TODO: Update placeholder value. $response = $service->datasets->get($projectId, $datasetId); @@ -91,8 +81,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -100,9 +92,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -110,16 +99,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID of the new dataset -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_Dataset(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->datasets->insert($projectId, $requestBody); @@ -135,8 +119,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -144,9 +130,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -154,20 +137,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholder below to desired parameter value for the `listDatasets` method: - // Project ID of the datasets to be listed -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->datasets->listDatasets($projectId, $optParams); - foreach ($response['datasets'] as $dataset_list._datasets) { - // TODO: Change code below to process each `dataset_list._datasets` resource: - echo '
', var_export($dataset_list._datasets, true), '
', "\n"; + foreach ($response['datasets'] as $datasets) { + // TODO: Change code below to process each `datasets` resource: + echo '
', var_export($datasets, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -182,8 +161,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -191,9 +172,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -201,19 +179,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID of the dataset being updated -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the dataset being updated -$datasetId = '{MY-DATASET-ID}'; - +$datasetId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Bigquery_Dataset(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->datasets->patch($projectId, $datasetId, $requestBody); @@ -229,8 +203,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -238,9 +214,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -248,19 +221,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID of the dataset being updated -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the dataset being updated -$datasetId = '{MY-DATASET-ID}'; - +$datasetId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_Dataset(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->datasets->update($projectId, $datasetId, $requestBody); @@ -276,8 +244,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -285,9 +255,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -295,15 +262,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `cancel` method: - // [Required] Project ID of the job to cancel -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // [Required] Job ID of the job to cancel -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. $response = $service->jobs->cancel($projectId, $jobId); @@ -319,8 +282,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -328,9 +293,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -338,15 +300,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // [Required] Project ID of the requested job -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // [Required] Job ID of the requested job -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. $response = $service->jobs->get($projectId, $jobId); @@ -362,8 +320,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -371,9 +331,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -381,15 +338,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `getQueryResults` method: - // [Required] Project ID of the query job -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // [Required] Job ID of the query job -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. $response = $service->jobs->getQueryResults($projectId, $jobId); @@ -405,8 +358,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -414,9 +369,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -424,21 +376,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID of the project that will be billed for the job -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_Job(); -// TODO: Assign values to desired properties of the `requestBody` object. - // TODO: Add desired media content for upload. For more information, see: // https://developers.google.com/api-client-library/php/guide/media_upload - $response = $service->jobs->insert($projectId, $requestBody); // TODO: Change code below to process the `response` object: @@ -453,8 +399,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -462,9 +410,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -472,20 +417,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholder below to desired parameter value for the `listJobs` method: - // Project ID of the jobs to list -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->jobs->listJobs($projectId, $optParams); - foreach ($response['jobs'] as $job_list._jobs) { - // TODO: Change code below to process each `job_list._jobs` resource: - echo '
', var_export($job_list._jobs, true), '
', "\n"; + foreach ($response['jobs'] as $jobs) { + // TODO: Change code below to process each `jobs` resource: + echo '
', var_export($jobs, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -500,8 +441,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -509,9 +452,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -519,16 +459,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholder below to desired parameter value for the `query` method: - // Project ID of the project billed for the query -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_QueryRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->jobs->query($projectId, $requestBody); @@ -544,8 +479,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -553,9 +490,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -563,14 +497,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -$optParams = array(); +$optParams = []; do { $response = $service->projects->listProjects($optParams); - foreach ($response['projects'] as $project_list._projects) { - // TODO: Change code below to process each `project_list._projects` resource: - echo '
', var_export($project_list._projects, true), '
', "\n"; + foreach ($response['projects'] as $projects) { + // TODO: Change code below to process each `projects` resource: + echo '
', var_export($projects, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -585,8 +518,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -594,9 +529,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -604,22 +536,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `insertAll` method: - // Project ID of the destination table. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the destination table. -$datasetId = '{MY-DATASET-ID}'; +$datasetId = ''; // TODO: Update placeholder value. // Table ID of the destination table. -$tableId = '{MY-TABLE-ID}'; - +$tableId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_TableDataInsertAllRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->tabledata->insertAll($projectId, $datasetId, $tableId, $requestBody); @@ -635,8 +562,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -644,9 +573,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -654,18 +580,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `listTabledata` method: - // Project ID of the table to read -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the table to read -$datasetId = '{MY-DATASET-ID}'; +$datasetId = ''; // TODO: Update placeholder value. // Table ID of the table to read -$tableId = '{MY-TABLE-ID}'; - +$tableId = ''; // TODO: Update placeholder value. $response = $service->tabledata->listTabledata($projectId, $datasetId, $tableId); @@ -681,8 +603,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -690,9 +614,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -700,18 +621,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID of the table to delete -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the table to delete -$datasetId = '{MY-DATASET-ID}'; +$datasetId = ''; // TODO: Update placeholder value. // Table ID of the table to delete -$tableId = '{MY-TABLE-ID}'; - +$tableId = ''; // TODO: Update placeholder value. $service->tables->delete($projectId, $datasetId, $tableId); ?> @@ -724,8 +641,10 @@ $service->tables->delete($projectId, $datasetId, $tableId); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -733,9 +652,6 @@ $service->tables->delete($projectId, $datasetId, $tableId); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -743,18 +659,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID of the requested table -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the requested table -$datasetId = '{MY-DATASET-ID}'; +$datasetId = ''; // TODO: Update placeholder value. // Table ID of the requested table -$tableId = '{MY-TABLE-ID}'; - +$tableId = ''; // TODO: Update placeholder value. $response = $service->tables->get($projectId, $datasetId, $tableId); @@ -770,8 +682,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -779,9 +693,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -789,19 +700,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` method: - // Project ID of the new table -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the new table -$datasetId = '{MY-DATASET-ID}'; - +$datasetId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_Table(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->tables->insert($projectId, $datasetId, $requestBody); @@ -817,8 +723,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -826,9 +734,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -836,23 +741,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `listTables` method: - // Project ID of the tables to list -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the tables to list -$datasetId = '{MY-DATASET-ID}'; - +$datasetId = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->tables->listTables($projectId, $datasetId, $optParams); - foreach ($response['tables'] as $table_list._tables) { - // TODO: Change code below to process each `table_list._tables` resource: - echo '
', var_export($table_list._tables, true), '
', "\n"; + foreach ($response['tables'] as $tables) { + // TODO: Change code below to process each `tables` resource: + echo '
', var_export($tables, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -867,8 +768,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -876,9 +779,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -886,22 +786,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID of the table to update -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the table to update -$datasetId = '{MY-DATASET-ID}'; +$datasetId = ''; // TODO: Update placeholder value. // Table ID of the table to update -$tableId = '{MY-TABLE-ID}'; - +$tableId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Bigquery_Table(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->tables->patch($projectId, $datasetId, $tableId, $requestBody); @@ -917,8 +813,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -926,9 +824,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-BigquerySample/0.1'); $client->useApplicationDefaultCredentials(); @@ -936,22 +831,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Bigquery($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID of the table to update -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Dataset ID of the table to update -$datasetId = '{MY-DATASET-ID}'; +$datasetId = ''; // TODO: Update placeholder value. // Table ID of the table to update -$tableId = '{MY-TABLE-ID}'; - +$tableId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Bigquery_Table(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->tables->update($projectId, $datasetId, $tableId, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudbilling.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudbilling.v1.json.baseline index 037d3ecac1..8ab5f1538f 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudbilling.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudbilling.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudbillingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,13 +26,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Cloudbilling($client); - -// TODO: Change placeholder below to desired parameter value for the `get` 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' $response = $service->billingAccounts->get($name); @@ -49,8 +45,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -58,9 +56,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudbillingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -68,14 +63,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Cloudbilling($client); - -$optParams = array(); +$optParams = []; do { $response = $service->billingAccounts->listBillingAccounts($optParams); - foreach ($response['billingAccounts'] as $billing_account) { - // TODO: Change code below to process each `billing_account` resource: - echo '
', var_export($billing_account, true), '
', "\n"; + foreach ($response['billingAccounts'] as $billingAccount) { + // TODO: Change code below to process each `billingAccount` resource: + echo '
', var_export($billingAccount, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -90,8 +84,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -99,9 +95,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudbillingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -109,21 +102,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Cloudbilling($client); - -// TODO: Change placeholder below to desired parameter value for the `listBillingAccountsProjects` 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' -$optParams = array(); +$optParams = []; do { $response = $service->billingAccounts_projects->listBillingAccountsProjects($name, $optParams); - foreach ($response['projectBillingInfo'] as $project_billing_info) { - // TODO: Change code below to process each `project_billing_info` resource: - echo '
', var_export($project_billing_info, true), '
', "\n"; + foreach ($response['projectBillingInfo'] as $projectBillingInfo) { + // TODO: Change code below to process each `projectBillingInfo` resource: + echo '
', var_export($projectBillingInfo, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -138,8 +128,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -147,9 +139,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudbillingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -157,13 +146,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Cloudbilling($client); - -// TODO: Change placeholder below to desired parameter value for the `getBillingInfo` 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' $response = $service->projects->getBillingInfo($name); @@ -179,8 +165,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -188,9 +176,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudbillingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -198,17 +183,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Cloudbilling($client); - -// TODO: Change placeholder below to desired parameter value for the `updateBillingInfo` 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 properties of `requestBody`: $requestBody = new Google_Service_Cloudbilling_ProjectBillingInfo(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->updateBillingInfo($name, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouddebugger.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouddebugger.v2.json.baseline index 229a3c872e..399b692938 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouddebugger.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouddebugger.v2.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,12 +26,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - -// TODO: Change placeholder below to desired parameter value for the `listControllerDebuggeesBreakpoints` method: - // Identifies the debuggee. -$debuggeeId = '{MY-DEBUGGEE-ID}'; - +$debuggeeId = ''; // TODO: Update placeholder value. $response = $service->controller_debuggees_breakpoints->listControllerDebuggeesBreakpoints($debuggeeId); @@ -48,8 +43,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -57,9 +54,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -67,19 +61,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Identifies the debuggee being debugged. -$debuggeeId = '{MY-DEBUGGEE-ID}'; +$debuggeeId = ''; // 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 properties of `requestBody`: $requestBody = new Google_Service_CloudDebugger_UpdateActiveBreakpointRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->controller_debuggees_breakpoints->update($debuggeeId, $id, $requestBody); @@ -95,8 +84,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -104,9 +95,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -114,10 +102,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudDebugger_RegisterDebuggeeRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->controller_debuggees->register($requestBody); @@ -133,8 +119,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -142,9 +130,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -152,15 +137,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // ID of the debuggee whose breakpoint to delete. -$debuggeeId = '{MY-DEBUGGEE-ID}'; +$debuggeeId = ''; // TODO: Update placeholder value. // ID of the breakpoint to delete. -$breakpointId = '{MY-BREAKPOINT-ID}'; - +$breakpointId = ''; // TODO: Update placeholder value. $service->debugger_debuggees_breakpoints->delete($debuggeeId, $breakpointId); ?> @@ -173,8 +154,10 @@ $service->debugger_debuggees_breakpoints->delete($debuggeeId, $breakpointId); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -182,9 +165,6 @@ $service->debugger_debuggees_breakpoints->delete($debuggeeId, $breakpointId); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -192,15 +172,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // ID of the debuggee whose breakpoint to get. -$debuggeeId = '{MY-DEBUGGEE-ID}'; +$debuggeeId = ''; // TODO: Update placeholder value. // ID of the breakpoint to get. -$breakpointId = '{MY-BREAKPOINT-ID}'; - +$breakpointId = ''; // TODO: Update placeholder value. $response = $service->debugger_debuggees_breakpoints->get($debuggeeId, $breakpointId); @@ -216,8 +192,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -225,9 +203,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -235,12 +210,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - -// TODO: Change placeholder below to desired parameter value for the `listDebuggerDebuggeesBreakpoints` method: - // ID of the debuggee whose breakpoints to list. -$debuggeeId = '{MY-DEBUGGEE-ID}'; - +$debuggeeId = ''; // TODO: Update placeholder value. $response = $service->debugger_debuggees_breakpoints->listDebuggerDebuggeesBreakpoints($debuggeeId); @@ -256,8 +227,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -265,9 +238,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -275,16 +245,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - -// TODO: Change placeholder below to desired parameter value for the `set` method: - // ID of the debuggee where the breakpoint is to be set. -$debuggeeId = '{MY-DEBUGGEE-ID}'; - +$debuggeeId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudDebugger_Breakpoint(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->debugger_debuggees_breakpoints->set($debuggeeId, $requestBody); @@ -300,8 +265,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -309,9 +276,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudDebuggerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -319,7 +283,6 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudDebugger($client); - $response = $service->debugger_debuggees->listDebuggerDebuggees(); // TODO: Change code below to process the `response` object: diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudmonitoring.v2beta2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudmonitoring.v2beta2.json.baseline index 01ab22b595..7e12b93cb2 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudmonitoring.v2beta2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudmonitoring.v2beta2.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudMonitoringSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,16 +26,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudMonitoring($client); - -// TODO: Change placeholder below to desired parameter value for the `create` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudMonitoring_MetricDescriptor(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->metricDescriptors->create($project, $requestBody); @@ -52,8 +46,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -61,9 +57,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudMonitoringSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -71,15 +64,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudMonitoring($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->metricDescriptors->delete($project, $metric); @@ -95,8 +84,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -104,9 +95,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudMonitoringSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -114,24 +102,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudMonitoring($client); - -// TODO: Change placeholder below to desired parameter value for the `listMetricDescriptors` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudMonitoring_ListMetricDescriptorsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->metricDescriptors->listMetricDescriptors($project, $requestBody, $optParams); - foreach ($response['metrics'] as $metric_descriptor) { - // TODO: Change code below to process each `metric_descriptor` resource: - echo '
', var_export($metric_descriptor, true), '
', "\n"; + foreach ($response['metrics'] as $metricDescriptor) { + // TODO: Change code below to process each `metricDescriptor` resource: + echo '
', var_export($metricDescriptor, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -146,8 +129,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -155,9 +140,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudMonitoringSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -165,26 +147,21 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudMonitoring($client); - -// TODO: Change placeholders below to desired parameter values for the `listTimeseries` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudMonitoring_ListTimeseriesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->timeseries->listTimeseries($project, $metric, $youngest, $requestBody, $optParams); @@ -205,8 +182,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -214,9 +193,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudMonitoringSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -224,16 +200,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudMonitoring($client); - -// TODO: Change placeholder below to desired parameter value for the `write` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudMonitoring_WriteTimeseriesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->timeseries->write($project, $requestBody); @@ -249,8 +220,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -258,9 +231,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudMonitoringSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -268,32 +238,27 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudMonitoring($client); - -// TODO: Change placeholders below to desired parameter values for the `listTimeseriesDescriptors` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudMonitoring_ListTimeseriesDescriptorsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->timeseriesDescriptors->listTimeseriesDescriptors($project, $metric, $youngest, $requestBody, $optParams); - foreach ($response['timeseries'] as $timeseries_descriptor) { - // TODO: Change code below to process each `timeseries_descriptor` resource: - echo '
', var_export($timeseries_descriptor, true), '
', "\n"; + foreach ($response['timeseries'] as $timeseriesDescriptor) { + // TODO: Change code below to process each `timeseriesDescriptor` resource: + echo '
', var_export($timeseriesDescriptor, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudresourcemanager.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudresourcemanager.v1.json.baseline index e931a4e8da..3083b81419 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudresourcemanager.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudresourcemanager.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,12 +26,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The name of the operation resource. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. $response = $service->operations->get($name); @@ -48,8 +43,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -57,9 +54,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -67,12 +61,9 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `get` 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' $response = $service->organizations->get($name); @@ -88,8 +79,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -97,9 +90,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -107,17 +97,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); +// 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 `getIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_GetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->organizations->getIamPolicy($resource, $requestBody); @@ -133,8 +119,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -142,9 +130,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -152,12 +137,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_SearchOrganizationsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->organizations->search($requestBody, $optParams); @@ -178,8 +161,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -187,9 +172,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -197,17 +179,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); +// 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 `setIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_SetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->organizations->setIamPolicy($resource, $requestBody); @@ -223,8 +201,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -232,9 +212,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -242,17 +219,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `testIamPermissions` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_TestIamPermissionsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->organizations->testIamPermissions($resource, $requestBody); @@ -268,8 +241,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -277,9 +252,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -287,10 +259,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_Project(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->create($requestBody); @@ -306,8 +276,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -315,9 +287,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -325,12 +294,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // The Project ID (for example, `foo-bar-123`). Required. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. $service->projects->delete($projectId); ?> @@ -343,8 +308,10 @@ $service->projects->delete($projectId); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -352,9 +319,6 @@ $service->projects->delete($projectId); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -362,12 +326,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The Project ID (for example, `my-project-123`). Required. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. $response = $service->projects->get($projectId); @@ -383,8 +343,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -392,9 +354,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -402,17 +361,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); +// 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 `getIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_GetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->getIamPolicy($resource, $requestBody); @@ -428,8 +382,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -437,9 +393,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -447,8 +400,7 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -$optParams = array(); +$optParams = []; do { $response = $service->projects->listProjects($optParams); @@ -469,8 +421,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -478,9 +432,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -488,17 +439,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); +// 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 `setIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_SetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->setIamPolicy($resource, $requestBody); @@ -514,8 +460,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -523,9 +471,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -533,17 +478,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `testIamPermissions` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_TestIamPermissionsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->testIamPermissions($resource, $requestBody); @@ -559,8 +499,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -568,9 +510,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -578,16 +517,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `undelete` method: - // The project ID (for example, `foo-bar-123`). Required. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_UndeleteProjectRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->projects->undelete($projectId, $requestBody); ?> @@ -600,8 +534,10 @@ $service->projects->undelete($projectId, $requestBody); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -609,9 +545,6 @@ $service->projects->undelete($projectId, $requestBody); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudResourceManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -619,16 +552,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudResourceManager($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // The project ID (for example, `my-project-123`). Required. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudResourceManager_Project(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->update($projectId, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudtrace.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudtrace.v1.json.baseline index 093be9fae6..df788efc8e 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudtrace.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_cloudtrace.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudTraceSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,16 +26,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudTrace($client); - -// TODO: Change placeholder below to desired parameter value for the `patchTraces` method: - // ID of the Cloud project where the trace data is stored. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_CloudTrace_Traces(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $service->projects->patchTraces($projectId, $requestBody); ?> @@ -49,8 +44,10 @@ $service->projects->patchTraces($projectId, $requestBody); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -58,9 +55,6 @@ $service->projects->patchTraces($projectId, $requestBody); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudTraceSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -68,15 +62,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudTrace($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // ID of the Cloud project where the trace data is stored. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // ID of the trace to return. -$traceId = '{MY-TRACE-ID}'; - +$traceId = ''; // TODO: Update placeholder value. $response = $service->projects_traces->get($projectId, $traceId); @@ -92,8 +82,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -101,9 +93,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudTraceSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -111,14 +100,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudTrace($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsTraces` method: - // ID of the Cloud project where the trace data is stored. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->projects_traces->listProjectsTraces($projectId, $optParams); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouduseraccounts.beta.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouduseraccounts.beta.json.baseline index fb319925df..40dadf196b 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouduseraccounts.beta.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_clouduseraccounts.beta.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,15 +26,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->globalAccountsOperations->delete($project, $operation); ?> @@ -48,8 +43,10 @@ $service->globalAccountsOperations->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -57,9 +54,6 @@ $service->globalAccountsOperations->delete($project, $operation); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -67,15 +61,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->globalAccountsOperations->get($project, $operation); @@ -91,8 +81,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -100,9 +92,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -110,14 +99,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholder below to desired parameter value for the `listGlobalAccountsOperations` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->globalAccountsOperations->listGlobalAccountsOperations($project, $optParams); @@ -138,8 +123,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -147,9 +134,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -157,19 +141,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `addMember` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the group for this request. -$groupName = '{MY-GROUP-NAME}'; - +$groupName = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudUserAccounts_GroupsAddMemberRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->groups->addMember($project, $groupName, $requestBody); @@ -185,8 +164,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -194,9 +175,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -204,15 +182,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the Group resource to delete. -$groupName = '{MY-GROUP-NAME}'; - +$groupName = ''; // TODO: Update placeholder value. $response = $service->groups->delete($project, $groupName); @@ -228,8 +202,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -237,9 +213,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -247,15 +220,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the Group resource to return. -$groupName = '{MY-GROUP-NAME}'; - +$groupName = ''; // TODO: Update placeholder value. $response = $service->groups->get($project, $groupName); @@ -271,8 +240,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -280,9 +251,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -290,16 +258,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudUserAccounts_Group(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->groups->insert($project, $requestBody); @@ -315,8 +278,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -324,9 +289,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -334,14 +296,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholder below to desired parameter value for the `listGroups` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->groups->listGroups($project, $optParams); @@ -362,8 +320,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -371,9 +331,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -381,19 +338,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `removeMember` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the group for this request. -$groupName = '{MY-GROUP-NAME}'; - +$groupName = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudUserAccounts_GroupsRemoveMemberRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->groups->removeMember($project, $groupName, $requestBody); @@ -409,8 +361,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -418,9 +372,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -428,21 +379,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `getAuthorizedKeysView` 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. $response = $service->linux->getAuthorizedKeysView($project, $zone, $user, $instance); @@ -458,8 +405,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -467,9 +416,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -477,18 +423,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `getLinuxAccountViews` 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. $response = $service->linux->getLinuxAccountViews($project, $zone, $instance); @@ -504,8 +446,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -513,9 +457,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -523,19 +464,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `addPublicKey` 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 properties of `requestBody`: $requestBody = new Google_Service_CloudUserAccounts_PublicKey(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->users->addPublicKey($project, $user, $requestBody); @@ -551,8 +487,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -560,9 +498,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -570,15 +505,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->users->delete($project, $user); @@ -594,8 +525,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -603,9 +536,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -613,15 +543,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->users->get($project, $user); @@ -637,8 +563,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -646,9 +574,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -656,16 +581,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_CloudUserAccounts_User(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->users->insert($project, $requestBody); @@ -681,8 +601,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -690,9 +612,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -700,14 +619,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholder below to desired parameter value for the `listUsers` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->users->listUsers($project, $optParams); @@ -728,8 +643,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -737,9 +654,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-CloudUserAccountsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -747,19 +661,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_CloudUserAccounts($client); - -// TODO: Change placeholders below to desired parameter values for the `removePublicKey` 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. $response = $service->users->removePublicKey($project, $user, $fingerprint); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_compute.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_compute.v1.json.baseline index 226a37e6cc..d44a51e6c6 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_compute.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_compute.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,20 +26,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->addresses->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $addresses_scoped_list) { - // TODO: Change code below to process each ($name => $addresses_scoped_list) element: - echo '
', $name, ' => ', var_export($addresses_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $addressesScopedList) { + // TODO: Change code below to process each (name => addressesScopedList) element: + echo '
', $name, ' => ', var_export($addressesScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -55,8 +50,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -64,9 +61,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -74,18 +68,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->addresses->delete($project, $region, $address); @@ -101,8 +91,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -110,9 +102,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -120,18 +109,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->addresses->get($project, $region, $address); @@ -147,8 +132,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -156,9 +143,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -166,19 +150,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Address(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->addresses->insert($project, $region, $requestBody); @@ -194,8 +173,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -203,9 +184,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -213,17 +191,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listAddresses` 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. -$optParams = array(); +$optParams = []; do { $response = $service->addresses->listAddresses($project, $region, $optParams); @@ -244,8 +218,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -253,9 +229,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -263,20 +236,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->autoscalers->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $autoscalers_scoped_list) { - // TODO: Change code below to process each ($name => $autoscalers_scoped_list) element: - echo '
', $name, ' => ', var_export($autoscalers_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $autoscalersScopedList) { + // TODO: Change code below to process each (name => autoscalersScopedList) element: + echo '
', $name, ' => ', var_export($autoscalersScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -291,8 +260,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -300,9 +271,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -310,18 +278,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->autoscalers->delete($project, $zone, $autoscaler); @@ -337,8 +301,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -346,9 +312,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -356,18 +319,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->autoscalers->get($project, $zone, $autoscaler); @@ -383,8 +342,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -392,9 +353,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -402,19 +360,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Autoscaler(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->autoscalers->insert($project, $zone, $requestBody); @@ -430,8 +383,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -439,9 +394,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -449,17 +401,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listAutoscalers` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->autoscalers->listAutoscalers($project, $zone, $optParams); @@ -480,8 +428,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -489,9 +439,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -499,22 +446,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_Autoscaler(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->autoscalers->patch($project, $zone, $autoscaler, $requestBody); @@ -530,8 +473,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -539,9 +484,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -549,19 +491,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Autoscaler(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->autoscalers->update($project, $zone, $requestBody); @@ -577,8 +514,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -586,9 +525,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -596,15 +532,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the BackendService resource to delete. -$backendService = '{MY-BACKEND-SERVICE}'; - +$backendService = ''; // TODO: Update placeholder value. $response = $service->backendServices->delete($project, $backendService); @@ -620,8 +552,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -629,9 +563,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -639,15 +570,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the BackendService resource to return. -$backendService = '{MY-BACKEND-SERVICE}'; - +$backendService = ''; // TODO: Update placeholder value. $response = $service->backendServices->get($project, $backendService); @@ -663,8 +590,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -672,9 +601,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -682,19 +608,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `getHealth` method: - -// project -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the BackendService resource to which the queried instance belongs. -$backendService = '{MY-BACKEND-SERVICE}'; - +$backendService = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_ResourceGroupReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->backendServices->getHealth($project, $backendService, $requestBody); @@ -710,8 +630,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -719,9 +641,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -729,16 +648,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_BackendService(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->backendServices->insert($project, $requestBody); @@ -754,8 +668,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -763,9 +679,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -773,20 +686,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listBackendServices` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->backendServices->listBackendServices($project, $optParams); - foreach ($response['items'] as $backend_service) { - // TODO: Change code below to process each `backend_service` resource: - echo '
', var_export($backend_service, true), '
', "\n"; + foreach ($response['items'] as $backendService) { + // TODO: Change code below to process each `backendService` resource: + echo '
', var_export($backendService, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -801,8 +710,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -810,9 +721,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -820,19 +728,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the BackendService resource to update. -$backendService = '{MY-BACKEND-SERVICE}'; - +$backendService = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_BackendService(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->backendServices->patch($project, $backendService, $requestBody); @@ -848,8 +752,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -857,9 +763,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -867,19 +770,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the BackendService resource to update. -$backendService = '{MY-BACKEND-SERVICE}'; - +$backendService = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_BackendService(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->backendServices->update($project, $backendService, $requestBody); @@ -895,8 +793,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -904,9 +804,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -914,20 +811,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->diskTypes->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $disk_types_scoped_list) { - // TODO: Change code below to process each ($name => $disk_types_scoped_list) element: - echo '
', $name, ' => ', var_export($disk_types_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $diskTypesScopedList) { + // TODO: Change code below to process each (name => diskTypesScopedList) element: + echo '
', $name, ' => ', var_export($diskTypesScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -942,8 +835,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -951,9 +846,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -961,18 +853,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$diskType = '{MY-DISK-TYPE}'; - +$diskType = ''; // TODO: Update placeholder value. $response = $service->diskTypes->get($project, $zone, $diskType); @@ -988,8 +876,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -997,9 +887,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1007,23 +894,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listDiskTypes` 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. -$optParams = array(); +$optParams = []; do { $response = $service->diskTypes->listDiskTypes($project, $zone, $optParams); - foreach ($response['items'] as $disk_type) { - // TODO: Change code below to process each `disk_type` resource: - echo '
', var_export($disk_type, true), '
', "\n"; + foreach ($response['items'] as $diskType) { + // TODO: Change code below to process each `diskType` resource: + echo '
', var_export($diskType, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -1038,8 +921,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1047,9 +932,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1057,20 +939,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->disks->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $disks_scoped_list) { - // TODO: Change code below to process each ($name => $disks_scoped_list) element: - echo '
', $name, ' => ', var_export($disks_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $disksScopedList) { + // TODO: Change code below to process each (name => disksScopedList) element: + echo '
', $name, ' => ', var_export($disksScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -1085,8 +963,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1094,9 +974,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1104,22 +981,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `createSnapshot` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Snapshot(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->disks->createSnapshot($project, $zone, $disk, $requestBody); @@ -1135,8 +1007,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1144,9 +1018,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1154,18 +1025,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `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. // Name of the persistent disk to delete. -$disk = '{MY-DISK}'; - +$disk = ''; // TODO: Update placeholder value. $response = $service->disks->delete($project, $zone, $disk); @@ -1181,8 +1048,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1190,9 +1059,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1200,18 +1066,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->disks->get($project, $zone, $disk); @@ -1227,8 +1089,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1236,9 +1100,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1246,19 +1107,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Disk(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->disks->insert($project, $zone, $requestBody); @@ -1274,8 +1130,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1283,9 +1141,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1293,17 +1148,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listDisks` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->disks->listDisks($project, $zone, $optParams); @@ -1324,8 +1175,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1333,9 +1186,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1343,22 +1193,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `resize` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_DisksResizeRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->disks->resize($project, $zone, $disk, $requestBody); @@ -1374,8 +1219,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1383,9 +1230,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1393,15 +1237,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->firewalls->delete($project, $firewall); @@ -1417,8 +1257,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1426,9 +1268,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1436,15 +1275,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->firewalls->get($project, $firewall); @@ -1460,8 +1295,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1469,9 +1306,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1479,16 +1313,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_Firewall(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->firewalls->insert($project, $requestBody); @@ -1504,8 +1333,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1513,9 +1344,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1523,14 +1351,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listFirewalls` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->firewalls->listFirewalls($project, $optParams); @@ -1551,8 +1375,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1560,9 +1386,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1570,19 +1393,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_Firewall(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->firewalls->patch($project, $firewall, $requestBody); @@ -1598,8 +1417,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1607,9 +1428,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1617,19 +1435,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Firewall(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->firewalls->update($project, $firewall, $requestBody); @@ -1645,8 +1458,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1654,9 +1469,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1664,20 +1476,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->forwardingRules->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $forwarding_rules_scoped_list) { - // TODO: Change code below to process each ($name => $forwarding_rules_scoped_list) element: - echo '
', $name, ' => ', var_export($forwarding_rules_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $forwardingRulesScopedList) { + // TODO: Change code below to process each (name => forwardingRulesScopedList) element: + echo '
', $name, ' => ', var_export($forwardingRulesScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -1692,8 +1500,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1701,9 +1511,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1711,18 +1518,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$forwardingRule = '{MY-FORWARDING-RULE}'; - +$forwardingRule = ''; // TODO: Update placeholder value. $response = $service->forwardingRules->delete($project, $region, $forwardingRule); @@ -1738,8 +1541,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1747,9 +1552,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1757,18 +1559,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$forwardingRule = '{MY-FORWARDING-RULE}'; - +$forwardingRule = ''; // TODO: Update placeholder value. $response = $service->forwardingRules->get($project, $region, $forwardingRule); @@ -1784,8 +1582,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1793,9 +1593,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1803,19 +1600,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_ForwardingRule(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->forwardingRules->insert($project, $region, $requestBody); @@ -1831,8 +1623,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1840,9 +1634,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1850,23 +1641,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listForwardingRules` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->forwardingRules->listForwardingRules($project, $region, $optParams); - foreach ($response['items'] as $forwarding_rule) { - // TODO: Change code below to process each `forwarding_rule` resource: - echo '
', var_export($forwarding_rule, true), '
', "\n"; + foreach ($response['items'] as $forwardingRule) { + // TODO: Change code below to process each `forwardingRule` resource: + echo '
', var_export($forwardingRule, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -1881,8 +1668,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1890,9 +1679,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1900,22 +1686,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setTarget` 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. -$forwardingRule = '{MY-FORWARDING-RULE}'; - +$forwardingRule = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->forwardingRules->setTarget($project, $region, $forwardingRule, $requestBody); @@ -1931,8 +1712,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1940,9 +1723,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1950,15 +1730,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->globalAddresses->delete($project, $address); @@ -1974,8 +1750,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1983,9 +1761,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1993,15 +1768,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->globalAddresses->get($project, $address); @@ -2017,8 +1788,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2026,9 +1799,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2036,16 +1806,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_Address(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->globalAddresses->insert($project, $requestBody); @@ -2061,8 +1826,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2070,9 +1837,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2080,14 +1844,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listGlobalAddresses` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->globalAddresses->listGlobalAddresses($project, $optParams); @@ -2108,8 +1868,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2117,9 +1879,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2127,15 +1886,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the ForwardingRule resource to delete. -$forwardingRule = '{MY-FORWARDING-RULE}'; - +$forwardingRule = ''; // TODO: Update placeholder value. $response = $service->globalForwardingRules->delete($project, $forwardingRule); @@ -2151,8 +1906,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2160,9 +1917,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2170,15 +1924,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the ForwardingRule resource to return. -$forwardingRule = '{MY-FORWARDING-RULE}'; - +$forwardingRule = ''; // TODO: Update placeholder value. $response = $service->globalForwardingRules->get($project, $forwardingRule); @@ -2194,8 +1944,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2203,9 +1955,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2213,16 +1962,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_ForwardingRule(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->globalForwardingRules->insert($project, $requestBody); @@ -2238,8 +1982,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2247,9 +1993,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2257,20 +2000,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listGlobalForwardingRules` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->globalForwardingRules->listGlobalForwardingRules($project, $optParams); - foreach ($response['items'] as $forwarding_rule) { - // TODO: Change code below to process each `forwarding_rule` resource: - echo '
', var_export($forwarding_rule, true), '
', "\n"; + foreach ($response['items'] as $forwardingRule) { + // TODO: Change code below to process each `forwardingRule` resource: + echo '
', var_export($forwardingRule, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -2285,8 +2024,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2294,9 +2035,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2304,19 +2042,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setTarget` 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. -$forwardingRule = '{MY-FORWARDING-RULE}'; - +$forwardingRule = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->globalForwardingRules->setTarget($project, $forwardingRule, $requestBody); @@ -2332,8 +2065,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2341,9 +2076,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2351,20 +2083,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->globalOperations->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $operations_scoped_list) { - // TODO: Change code below to process each ($name => $operations_scoped_list) element: - echo '
', $name, ' => ', var_export($operations_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $operationsScopedList) { + // TODO: Change code below to process each (name => operationsScopedList) element: + echo '
', $name, ' => ', var_export($operationsScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -2379,8 +2107,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2388,9 +2118,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2398,15 +2125,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->globalOperations->delete($project, $operation); ?> @@ -2419,8 +2142,10 @@ $service->globalOperations->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2428,9 +2153,6 @@ $service->globalOperations->delete($project, $operation); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2438,15 +2160,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->globalOperations->get($project, $operation); @@ -2462,8 +2180,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2471,9 +2191,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2481,14 +2198,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listGlobalOperations` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->globalOperations->listGlobalOperations($project, $optParams); @@ -2509,8 +2222,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2518,9 +2233,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2528,15 +2240,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HealthCheck resource to delete. -$healthCheck = '{MY-HEALTH-CHECK}'; - +$healthCheck = ''; // TODO: Update placeholder value. $response = $service->healthChecks->delete($project, $healthCheck); @@ -2552,8 +2260,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2561,9 +2271,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2571,15 +2278,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HealthCheck resource to return. -$healthCheck = '{MY-HEALTH-CHECK}'; - +$healthCheck = ''; // TODO: Update placeholder value. $response = $service->healthChecks->get($project, $healthCheck); @@ -2595,8 +2298,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2604,9 +2309,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2614,16 +2316,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_HealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->healthChecks->insert($project, $requestBody); @@ -2639,8 +2336,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2648,9 +2347,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2658,20 +2354,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listHealthChecks` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->healthChecks->listHealthChecks($project, $optParams); - foreach ($response['items'] as $health_check) { - // TODO: Change code below to process each `health_check` resource: - echo '
', var_export($health_check, true), '
', "\n"; + foreach ($response['items'] as $healthCheck) { + // TODO: Change code below to process each `healthCheck` resource: + echo '
', var_export($healthCheck, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -2686,8 +2378,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2695,9 +2389,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2705,19 +2396,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HealthCheck resource to update. -$healthCheck = '{MY-HEALTH-CHECK}'; - +$healthCheck = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_HealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->healthChecks->patch($project, $healthCheck, $requestBody); @@ -2733,8 +2420,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2742,9 +2431,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2752,19 +2438,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HealthCheck resource to update. -$healthCheck = '{MY-HEALTH-CHECK}'; - +$healthCheck = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_HealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->healthChecks->update($project, $healthCheck, $requestBody); @@ -2780,8 +2461,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2789,9 +2472,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2799,15 +2479,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpHealthCheck resource to delete. -$httpHealthCheck = '{MY-HTTP-HEALTH-CHECK}'; - +$httpHealthCheck = ''; // TODO: Update placeholder value. $response = $service->httpHealthChecks->delete($project, $httpHealthCheck); @@ -2823,8 +2499,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2832,9 +2510,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2842,15 +2517,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpHealthCheck resource to return. -$httpHealthCheck = '{MY-HTTP-HEALTH-CHECK}'; - +$httpHealthCheck = ''; // TODO: Update placeholder value. $response = $service->httpHealthChecks->get($project, $httpHealthCheck); @@ -2866,8 +2537,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2875,9 +2548,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2885,16 +2555,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_HttpHealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->httpHealthChecks->insert($project, $requestBody); @@ -2910,8 +2575,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2919,9 +2586,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2929,20 +2593,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listHttpHealthChecks` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->httpHealthChecks->listHttpHealthChecks($project, $optParams); - foreach ($response['items'] as $http_health_check) { - // TODO: Change code below to process each `http_health_check` resource: - echo '
', var_export($http_health_check, true), '
', "\n"; + foreach ($response['items'] as $httpHealthCheck) { + // TODO: Change code below to process each `httpHealthCheck` resource: + echo '
', var_export($httpHealthCheck, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -2957,8 +2617,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -2966,9 +2628,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -2976,19 +2635,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpHealthCheck resource to update. -$httpHealthCheck = '{MY-HTTP-HEALTH-CHECK}'; - +$httpHealthCheck = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_HttpHealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->httpHealthChecks->patch($project, $httpHealthCheck, $requestBody); @@ -3004,8 +2659,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3013,9 +2670,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3023,19 +2677,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpHealthCheck resource to update. -$httpHealthCheck = '{MY-HTTP-HEALTH-CHECK}'; - +$httpHealthCheck = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_HttpHealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->httpHealthChecks->update($project, $httpHealthCheck, $requestBody); @@ -3051,8 +2700,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3060,9 +2711,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3070,15 +2718,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpsHealthCheck resource to delete. -$httpsHealthCheck = '{MY-HTTPS-HEALTH-CHECK}'; - +$httpsHealthCheck = ''; // TODO: Update placeholder value. $response = $service->httpsHealthChecks->delete($project, $httpsHealthCheck); @@ -3094,8 +2738,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3103,9 +2749,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3113,15 +2756,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpsHealthCheck resource to return. -$httpsHealthCheck = '{MY-HTTPS-HEALTH-CHECK}'; - +$httpsHealthCheck = ''; // TODO: Update placeholder value. $response = $service->httpsHealthChecks->get($project, $httpsHealthCheck); @@ -3137,8 +2776,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3146,9 +2787,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3156,16 +2794,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_HttpsHealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->httpsHealthChecks->insert($project, $requestBody); @@ -3181,8 +2814,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3190,9 +2825,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3200,20 +2832,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listHttpsHealthChecks` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->httpsHealthChecks->listHttpsHealthChecks($project, $optParams); - foreach ($response['items'] as $https_health_check) { - // TODO: Change code below to process each `https_health_check` resource: - echo '
', var_export($https_health_check, true), '
', "\n"; + foreach ($response['items'] as $httpsHealthCheck) { + // TODO: Change code below to process each `httpsHealthCheck` resource: + echo '
', var_export($httpsHealthCheck, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -3228,8 +2856,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3237,9 +2867,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3247,19 +2874,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpsHealthCheck resource to update. -$httpsHealthCheck = '{MY-HTTPS-HEALTH-CHECK}'; - +$httpsHealthCheck = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_HttpsHealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->httpsHealthChecks->patch($project, $httpsHealthCheck, $requestBody); @@ -3275,8 +2898,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3284,9 +2909,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3294,19 +2916,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the HttpsHealthCheck resource to update. -$httpsHealthCheck = '{MY-HTTPS-HEALTH-CHECK}'; - +$httpsHealthCheck = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_HttpsHealthCheck(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->httpsHealthChecks->update($project, $httpsHealthCheck, $requestBody); @@ -3322,8 +2939,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3331,9 +2950,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3341,15 +2957,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->images->delete($project, $image); @@ -3365,8 +2977,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3374,9 +2988,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3384,19 +2995,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `deprecate` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_DeprecationStatus(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->images->deprecate($project, $image, $requestBody); @@ -3412,8 +3018,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3421,9 +3029,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3431,15 +3036,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->images->get($project, $image); @@ -3455,8 +3056,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3464,9 +3067,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3474,15 +3074,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `getFromFamily` 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. $response = $service->images->getFromFamily($project, $family); @@ -3498,8 +3094,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3507,9 +3105,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3517,16 +3112,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_Image(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->images->insert($project, $requestBody); @@ -3542,8 +3132,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3551,9 +3143,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3561,14 +3150,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listImages` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->images->listImages($project, $optParams); @@ -3589,8 +3174,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3598,9 +3185,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3608,22 +3192,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `abandonInstances` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupManagersAbandonInstancesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroupManagers->abandonInstances($project, $zone, $instanceGroupManager, $requestBody); @@ -3639,8 +3218,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3648,9 +3229,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3658,20 +3236,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->instanceGroupManagers->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $instance_group_managers_scoped_list) { - // TODO: Change code below to process each ($name => $instance_group_managers_scoped_list) element: - echo '
', $name, ' => ', var_export($instance_group_managers_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $instanceGroupManagersScopedList) { + // TODO: Change code below to process each (name => instanceGroupManagersScopedList) element: + echo '
', $name, ' => ', var_export($instanceGroupManagersScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -3686,8 +3260,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3695,9 +3271,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3705,18 +3278,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. $response = $service->instanceGroupManagers->delete($project, $zone, $instanceGroupManager); @@ -3732,8 +3301,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3741,9 +3312,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3751,22 +3319,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `deleteInstances` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupManagersDeleteInstancesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroupManagers->deleteInstances($project, $zone, $instanceGroupManager, $requestBody); @@ -3782,8 +3345,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3791,9 +3356,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3801,18 +3363,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. $response = $service->instanceGroupManagers->get($project, $zone, $instanceGroupManager); @@ -3828,8 +3386,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3837,9 +3397,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3847,19 +3404,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupManager(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroupManagers->insert($project, $zone, $requestBody); @@ -3875,8 +3427,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3884,9 +3438,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3894,23 +3445,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listInstanceGroupManagers` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->instanceGroupManagers->listInstanceGroupManagers($project, $zone, $optParams); - foreach ($response['items'] as $instance_group_manager) { - // TODO: Change code below to process each `instance_group_manager` resource: - echo '
', var_export($instance_group_manager, true), '
', "\n"; + foreach ($response['items'] as $instanceGroupManager) { + // TODO: Change code below to process each `instanceGroupManager` resource: + echo '
', var_export($instanceGroupManager, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -3925,8 +3472,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3934,9 +3483,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3944,18 +3490,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listManagedInstances` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. $response = $service->instanceGroupManagers->listManagedInstances($project, $zone, $instanceGroupManager); @@ -3971,8 +3513,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -3980,9 +3524,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -3990,22 +3531,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `recreateInstances` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupManagersRecreateInstancesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroupManagers->recreateInstances($project, $zone, $instanceGroupManager, $requestBody); @@ -4021,8 +3557,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4030,9 +3568,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4040,23 +3575,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `resize` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; +$instanceGroupManager = ''; // 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. $response = $service->instanceGroupManagers->resize($project, $zone, $instanceGroupManager, $size); @@ -4072,8 +3603,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4081,9 +3614,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4091,22 +3621,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setInstanceTemplate` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupManagersSetInstanceTemplateRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroupManagers->setInstanceTemplate($project, $zone, $instanceGroupManager, $requestBody); @@ -4122,8 +3647,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4131,9 +3658,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4141,22 +3665,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setTargetPools` 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. -$instanceGroupManager = '{MY-INSTANCE-GROUP-MANAGER}'; - +$instanceGroupManager = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupManagersSetTargetPoolsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroupManagers->setTargetPools($project, $zone, $instanceGroupManager, $requestBody); @@ -4172,8 +3691,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4181,9 +3702,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4191,22 +3709,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `addInstances` 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. -$instanceGroup = '{MY-INSTANCE-GROUP}'; - +$instanceGroup = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupsAddInstancesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroups->addInstances($project, $zone, $instanceGroup, $requestBody); @@ -4222,8 +3735,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4231,9 +3746,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4241,20 +3753,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->instanceGroups->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $instance_groups_scoped_list) { - // TODO: Change code below to process each ($name => $instance_groups_scoped_list) element: - echo '
', $name, ' => ', var_export($instance_groups_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $instanceGroupsScopedList) { + // TODO: Change code below to process each (name => instanceGroupsScopedList) element: + echo '
', $name, ' => ', var_export($instanceGroupsScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -4269,8 +3777,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4278,9 +3788,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4288,18 +3795,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$instanceGroup = '{MY-INSTANCE-GROUP}'; - +$instanceGroup = ''; // TODO: Update placeholder value. $response = $service->instanceGroups->delete($project, $zone, $instanceGroup); @@ -4315,8 +3818,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4324,9 +3829,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4334,18 +3836,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$instanceGroup = '{MY-INSTANCE-GROUP}'; - +$instanceGroup = ''; // TODO: Update placeholder value. $response = $service->instanceGroups->get($project, $zone, $instanceGroup); @@ -4361,8 +3859,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4370,9 +3870,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4380,19 +3877,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroups->insert($project, $zone, $requestBody); @@ -4408,8 +3900,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4417,9 +3911,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4427,23 +3918,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listInstanceGroups` 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. -$optParams = array(); +$optParams = []; do { $response = $service->instanceGroups->listInstanceGroups($project, $zone, $optParams); - foreach ($response['items'] as $instance_group) { - // TODO: Change code below to process each `instance_group` resource: - echo '
', var_export($instance_group, true), '
', "\n"; + foreach ($response['items'] as $instanceGroup) { + // TODO: Change code below to process each `instanceGroup` resource: + echo '
', var_export($instanceGroup, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -4458,8 +3945,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4467,9 +3956,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4477,30 +3963,25 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listInstances` 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. -$instanceGroup = '{MY-INSTANCE-GROUP}'; - +$instanceGroup = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupsListInstancesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->instanceGroups->listInstances($project, $zone, $instanceGroup, $requestBody, $optParams); - foreach ($response['items'] as $instance_with_named_ports) { - // TODO: Change code below to process each `instance_with_named_ports` resource: - echo '
', var_export($instance_with_named_ports, true), '
', "\n"; + foreach ($response['items'] as $instanceWithNamedPorts) { + // TODO: Change code below to process each `instanceWithNamedPorts` resource: + echo '
', var_export($instanceWithNamedPorts, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -4515,8 +3996,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4524,9 +4007,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4534,22 +4014,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `removeInstances` 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. -$instanceGroup = '{MY-INSTANCE-GROUP}'; - +$instanceGroup = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupsRemoveInstancesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroups->removeInstances($project, $zone, $instanceGroup, $requestBody); @@ -4565,8 +4040,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4574,9 +4051,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4584,22 +4058,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setNamedPorts` 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. -$instanceGroup = '{MY-INSTANCE-GROUP}'; - +$instanceGroup = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceGroupsSetNamedPortsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceGroups->setNamedPorts($project, $zone, $instanceGroup, $requestBody); @@ -4615,8 +4084,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4624,9 +4095,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4634,15 +4102,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // The name of the instance template to delete. -$instanceTemplate = '{MY-INSTANCE-TEMPLATE}'; - +$instanceTemplate = ''; // TODO: Update placeholder value. $response = $service->instanceTemplates->delete($project, $instanceTemplate); @@ -4658,8 +4122,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4667,9 +4133,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4677,15 +4140,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // The name of the instance template. -$instanceTemplate = '{MY-INSTANCE-TEMPLATE}'; - +$instanceTemplate = ''; // TODO: Update placeholder value. $response = $service->instanceTemplates->get($project, $instanceTemplate); @@ -4701,8 +4160,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4710,9 +4171,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4720,16 +4178,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceTemplate(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instanceTemplates->insert($project, $requestBody); @@ -4745,8 +4198,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4754,9 +4209,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4764,20 +4216,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listInstanceTemplates` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->instanceTemplates->listInstanceTemplates($project, $optParams); - foreach ($response['items'] as $instance_template) { - // TODO: Change code below to process each `instance_template` resource: - echo '
', var_export($instance_template, true), '
', "\n"; + foreach ($response['items'] as $instanceTemplate) { + // TODO: Change code below to process each `instanceTemplate` resource: + echo '
', var_export($instanceTemplate, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -4792,8 +4240,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4801,9 +4251,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4811,25 +4258,20 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `addAccessConfig` 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. -$networkInterface = '{MY-NETWORK-INTERFACE}'; - +$networkInterface = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_AccessConfig(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->addAccessConfig($project, $zone, $instance, $networkInterface, $requestBody); @@ -4845,8 +4287,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4854,9 +4298,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4864,20 +4305,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->instances->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $instances_scoped_list) { - // TODO: Change code below to process each ($name => $instances_scoped_list) element: - echo '
', $name, ' => ', var_export($instances_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $instancesScopedList) { + // TODO: Change code below to process each (name => instancesScopedList) element: + echo '
', $name, ' => ', var_export($instancesScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -4892,8 +4329,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4901,9 +4340,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4911,22 +4347,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `attachDisk` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_AttachedDisk(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->attachDisk($project, $zone, $instance, $requestBody); @@ -4942,8 +4373,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4951,9 +4384,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -4961,18 +4391,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `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. // Name of the instance resource to delete. -$instance = '{MY-INSTANCE}'; - +$instance = ''; // TODO: Update placeholder value. $response = $service->instances->delete($project, $zone, $instance); @@ -4988,8 +4414,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -4997,9 +4425,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5007,24 +4432,20 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `deleteAccessConfig` 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. -$accessConfig = '{MY-ACCESS-CONFIG}'; +$accessConfig = ''; // TODO: Update placeholder value. // The name of the network interface. -$networkInterface = '{MY-NETWORK-INTERFACE}'; - +$networkInterface = ''; // TODO: Update placeholder value. $response = $service->instances->deleteAccessConfig($project, $zone, $instance, $accessConfig, $networkInterface); @@ -5040,8 +4461,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5049,9 +4472,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5059,21 +4479,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `detachDisk` 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. -$deviceName = '{MY-DEVICE-NAME}'; - +$deviceName = ''; // TODO: Update placeholder value. $response = $service->instances->detachDisk($project, $zone, $instance, $deviceName); @@ -5089,8 +4505,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5098,9 +4516,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5108,18 +4523,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->instances->get($project, $zone, $instance); @@ -5135,8 +4546,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5144,9 +4557,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5154,18 +4564,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `getSerialPortOutput` 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. $response = $service->instances->getSerialPortOutput($project, $zone, $instance); @@ -5181,8 +4587,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5190,9 +4598,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5200,19 +4605,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Instance(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->insert($project, $zone, $requestBody); @@ -5228,8 +4628,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5237,9 +4639,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5247,17 +4646,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listInstances` 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. -$optParams = array(); +$optParams = []; do { $response = $service->instances->listInstances($project, $zone, $optParams); @@ -5278,8 +4673,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5287,9 +4684,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5297,18 +4691,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `reset` 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. $response = $service->instances->reset($project, $zone, $instance); @@ -5324,8 +4714,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5333,9 +4725,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5343,24 +4732,20 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setDiskAutoDelete` 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. -$autoDelete = false; +$autoDelete = false; // TODO: Update placeholder value. // The device name of the disk to modify. -$deviceName = '{MY-DEVICE-NAME}'; - +$deviceName = ''; // TODO: Update placeholder value. $response = $service->instances->setDiskAutoDelete($project, $zone, $instance, $autoDelete, $deviceName); @@ -5376,8 +4761,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5385,9 +4772,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5395,22 +4779,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setMachineType` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_InstancesSetMachineTypeRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->setMachineType($project, $zone, $instance, $requestBody); @@ -5426,8 +4805,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5435,9 +4816,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5445,22 +4823,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setMetadata` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Metadata(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->setMetadata($project, $zone, $instance, $requestBody); @@ -5476,8 +4849,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5485,9 +4860,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5495,22 +4867,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setScheduling` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Scheduling(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->setScheduling($project, $zone, $instance, $requestBody); @@ -5526,8 +4893,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5535,9 +4904,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5545,22 +4911,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setTags` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Tags(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->setTags($project, $zone, $instance, $requestBody); @@ -5576,8 +4937,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5585,9 +4948,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5595,18 +4955,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `start` 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. $response = $service->instances->start($project, $zone, $instance); @@ -5622,8 +4978,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5631,9 +4989,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5641,22 +4996,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `startWithEncryptionKey` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_InstancesStartWithEncryptionKeyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->startWithEncryptionKey($project, $zone, $instance, $requestBody); @@ -5672,8 +5022,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5681,9 +5033,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5691,18 +5040,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `stop` 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. $response = $service->instances->stop($project, $zone, $instance); @@ -5718,8 +5063,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5727,9 +5074,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5737,15 +5081,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->licenses->get($project, $license); @@ -5761,8 +5101,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5770,9 +5112,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5780,20 +5119,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->machineTypes->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $machine_types_scoped_list) { - // TODO: Change code below to process each ($name => $machine_types_scoped_list) element: - echo '
', $name, ' => ', var_export($machine_types_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $machineTypesScopedList) { + // TODO: Change code below to process each (name => machineTypesScopedList) element: + echo '
', $name, ' => ', var_export($machineTypesScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -5808,8 +5143,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5817,9 +5154,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5827,18 +5161,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$machineType = '{MY-MACHINE-TYPE}'; - +$machineType = ''; // TODO: Update placeholder value. $response = $service->machineTypes->get($project, $zone, $machineType); @@ -5854,8 +5184,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5863,9 +5195,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5873,23 +5202,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listMachineTypes` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->machineTypes->listMachineTypes($project, $zone, $optParams); - foreach ($response['items'] as $machine_type) { - // TODO: Change code below to process each `machine_type` resource: - echo '
', var_export($machine_type, true), '
', "\n"; + foreach ($response['items'] as $machineType) { + // TODO: Change code below to process each `machineType` resource: + echo '
', var_export($machineType, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -5904,8 +5229,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5913,9 +5240,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5923,15 +5247,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->networks->delete($project, $network); @@ -5947,8 +5267,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5956,9 +5278,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -5966,15 +5285,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->networks->get($project, $network); @@ -5990,8 +5305,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -5999,9 +5316,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6009,16 +5323,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_Network(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->networks->insert($project, $requestBody); @@ -6034,8 +5343,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6043,9 +5354,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6053,14 +5361,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listNetworks` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->networks->listNetworks($project, $optParams); @@ -6081,8 +5385,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6090,9 +5396,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6100,12 +5403,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. $response = $service->projects->get($project); @@ -6121,8 +5420,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6130,9 +5431,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6140,16 +5438,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `moveDisk` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_DiskMoveRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->moveDisk($project, $requestBody); @@ -6165,8 +5458,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6174,9 +5469,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6184,16 +5476,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `moveInstance` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceMoveRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->moveInstance($project, $requestBody); @@ -6209,8 +5496,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6218,9 +5507,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6228,16 +5514,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `setCommonInstanceMetadata` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_Metadata(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->setCommonInstanceMetadata($project, $requestBody); @@ -6253,8 +5534,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6262,9 +5545,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6272,16 +5552,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `setUsageExportBucket` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_UsageExportLocation(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->setUsageExportBucket($project, $requestBody); @@ -6297,8 +5572,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6306,9 +5583,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6316,18 +5590,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->regionOperations->delete($project, $region, $operation); ?> @@ -6340,8 +5610,10 @@ $service->regionOperations->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6349,9 +5621,6 @@ $service->regionOperations->delete($project, $region, $operation); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6359,18 +5628,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->regionOperations->get($project, $region, $operation); @@ -6386,8 +5651,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6395,9 +5662,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6405,17 +5669,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listRegionOperations` 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. -$optParams = array(); +$optParams = []; do { $response = $service->regionOperations->listRegionOperations($project, $region, $optParams); @@ -6436,8 +5696,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6445,9 +5707,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6455,15 +5714,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->regions->get($project, $region); @@ -6479,8 +5734,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6488,9 +5745,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6498,14 +5752,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listRegions` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->regions->listRegions($project, $optParams); @@ -6526,8 +5776,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6535,9 +5787,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6545,20 +5794,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->routers->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $routers_scoped_list) { - // TODO: Change code below to process each ($name => $routers_scoped_list) element: - echo '
', $name, ' => ', var_export($routers_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $routersScopedList) { + // TODO: Change code below to process each (name => routersScopedList) element: + echo '
', $name, ' => ', var_export($routersScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -6573,8 +5818,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6582,9 +5829,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6592,18 +5836,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->routers->delete($project, $region, $router); @@ -6619,8 +5859,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6628,9 +5870,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6638,18 +5877,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->routers->get($project, $region, $router); @@ -6665,8 +5900,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6674,9 +5911,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6684,18 +5918,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `getRouterStatus` 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. $response = $service->routers->getRouterStatus($project, $region, $router); @@ -6711,8 +5941,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6720,9 +5952,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6730,19 +5959,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Router(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->routers->insert($project, $region, $requestBody); @@ -6758,8 +5982,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6767,9 +5993,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6777,17 +6000,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listRouters` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->routers->listRouters($project, $region, $optParams); @@ -6808,8 +6027,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6817,9 +6038,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6827,22 +6045,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_Router(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->routers->patch($project, $region, $router, $requestBody); @@ -6858,8 +6072,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6867,9 +6083,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6877,22 +6090,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `preview` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Router(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->routers->preview($project, $region, $router, $requestBody); @@ -6908,8 +6116,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6917,9 +6127,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6927,22 +6134,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Router(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->routers->update($project, $region, $router, $requestBody); @@ -6958,8 +6160,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -6967,9 +6171,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -6977,15 +6178,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->routes->delete($project, $route); @@ -7001,8 +6198,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7010,9 +6209,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7020,15 +6216,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->routes->get($project, $route); @@ -7044,8 +6236,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7053,9 +6247,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7063,16 +6254,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_Route(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->routes->insert($project, $requestBody); @@ -7088,8 +6274,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7097,9 +6285,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7107,14 +6292,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listRoutes` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->routes->listRoutes($project, $optParams); @@ -7135,8 +6316,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7144,9 +6327,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7154,15 +6334,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->snapshots->delete($project, $snapshot); @@ -7178,8 +6354,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7187,9 +6365,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7197,15 +6372,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->snapshots->get($project, $snapshot); @@ -7221,8 +6392,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7230,9 +6403,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7240,14 +6410,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listSnapshots` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->snapshots->listSnapshots($project, $optParams); @@ -7268,8 +6434,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7277,9 +6445,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7287,15 +6452,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the SslCertificate resource to delete. -$sslCertificate = '{MY-SSL-CERTIFICATE}'; - +$sslCertificate = ''; // TODO: Update placeholder value. $response = $service->sslCertificates->delete($project, $sslCertificate); @@ -7311,8 +6472,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7320,9 +6483,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7330,15 +6490,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the SslCertificate resource to return. -$sslCertificate = '{MY-SSL-CERTIFICATE}'; - +$sslCertificate = ''; // TODO: Update placeholder value. $response = $service->sslCertificates->get($project, $sslCertificate); @@ -7354,8 +6510,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7363,9 +6521,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7373,16 +6528,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_SslCertificate(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->sslCertificates->insert($project, $requestBody); @@ -7398,8 +6548,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7407,9 +6559,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7417,20 +6566,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listSslCertificates` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->sslCertificates->listSslCertificates($project, $optParams); - foreach ($response['items'] as $ssl_certificate) { - // TODO: Change code below to process each `ssl_certificate` resource: - echo '
', var_export($ssl_certificate, true), '
', "\n"; + foreach ($response['items'] as $sslCertificate) { + // TODO: Change code below to process each `sslCertificate` resource: + echo '
', var_export($sslCertificate, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -7445,8 +6590,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7454,9 +6601,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7464,20 +6608,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->subnetworks->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $subnetworks_scoped_list) { - // TODO: Change code below to process each ($name => $subnetworks_scoped_list) element: - echo '
', $name, ' => ', var_export($subnetworks_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $subnetworksScopedList) { + // TODO: Change code below to process each (name => subnetworksScopedList) element: + echo '
', $name, ' => ', var_export($subnetworksScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -7492,8 +6632,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7501,9 +6643,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7511,18 +6650,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->subnetworks->delete($project, $region, $subnetwork); @@ -7538,8 +6673,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7547,9 +6684,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7557,18 +6691,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->subnetworks->get($project, $region, $subnetwork); @@ -7584,8 +6714,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7593,9 +6725,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7603,19 +6732,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_Subnetwork(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->subnetworks->insert($project, $region, $requestBody); @@ -7631,8 +6755,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7640,9 +6766,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7650,17 +6773,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listSubnetworks` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->subnetworks->listSubnetworks($project, $region, $optParams); @@ -7681,8 +6800,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7690,9 +6811,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7700,15 +6818,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetHttpProxy resource to delete. -$targetHttpProxy = '{MY-TARGET-HTTP-PROXY}'; - +$targetHttpProxy = ''; // TODO: Update placeholder value. $response = $service->targetHttpProxies->delete($project, $targetHttpProxy); @@ -7724,8 +6838,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7733,9 +6849,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7743,15 +6856,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetHttpProxy resource to return. -$targetHttpProxy = '{MY-TARGET-HTTP-PROXY}'; - +$targetHttpProxy = ''; // TODO: Update placeholder value. $response = $service->targetHttpProxies->get($project, $targetHttpProxy); @@ -7767,8 +6876,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7776,9 +6887,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7786,16 +6894,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetHttpProxy(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetHttpProxies->insert($project, $requestBody); @@ -7811,8 +6914,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7820,9 +6925,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7830,20 +6932,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listTargetHttpProxies` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->targetHttpProxies->listTargetHttpProxies($project, $optParams); - foreach ($response['items'] as $target_http_proxy) { - // TODO: Change code below to process each `target_http_proxy` resource: - echo '
', var_export($target_http_proxy, true), '
', "\n"; + foreach ($response['items'] as $targetHttpProxy) { + // TODO: Change code below to process each `targetHttpProxy` resource: + echo '
', var_export($targetHttpProxy, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -7858,8 +6956,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7867,9 +6967,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7877,19 +6974,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setUrlMap` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetHttpProxy to set a URL map for. -$targetHttpProxy = '{MY-TARGET-HTTP-PROXY}'; - +$targetHttpProxy = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_UrlMapReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetHttpProxies->setUrlMap($project, $targetHttpProxy, $requestBody); @@ -7905,8 +6997,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7914,9 +7008,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7924,15 +7015,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetHttpsProxy resource to delete. -$targetHttpsProxy = '{MY-TARGET-HTTPS-PROXY}'; - +$targetHttpsProxy = ''; // TODO: Update placeholder value. $response = $service->targetHttpsProxies->delete($project, $targetHttpsProxy); @@ -7948,8 +7035,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -7957,9 +7046,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -7967,15 +7053,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetHttpsProxy resource to return. -$targetHttpsProxy = '{MY-TARGET-HTTPS-PROXY}'; - +$targetHttpsProxy = ''; // TODO: Update placeholder value. $response = $service->targetHttpsProxies->get($project, $targetHttpsProxy); @@ -7991,8 +7073,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8000,9 +7084,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8010,16 +7091,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetHttpsProxy(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetHttpsProxies->insert($project, $requestBody); @@ -8035,8 +7111,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8044,9 +7122,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8054,20 +7129,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listTargetHttpsProxies` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->targetHttpsProxies->listTargetHttpsProxies($project, $optParams); - foreach ($response['items'] as $target_https_proxy) { - // TODO: Change code below to process each `target_https_proxy` resource: - echo '
', var_export($target_https_proxy, true), '
', "\n"; + foreach ($response['items'] as $targetHttpsProxy) { + // TODO: Change code below to process each `targetHttpsProxy` resource: + echo '
', var_export($targetHttpsProxy, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -8082,8 +7153,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8091,9 +7164,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8101,19 +7171,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setSslCertificates` 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. -$targetHttpsProxy = '{MY-TARGET-HTTPS-PROXY}'; - +$targetHttpsProxy = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetHttpsProxiesSetSslCertificatesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetHttpsProxies->setSslCertificates($project, $targetHttpsProxy, $requestBody); @@ -8129,8 +7194,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8138,9 +7205,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8148,19 +7212,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setUrlMap` 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. -$targetHttpsProxy = '{MY-TARGET-HTTPS-PROXY}'; - +$targetHttpsProxy = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_UrlMapReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetHttpsProxies->setUrlMap($project, $targetHttpsProxy, $requestBody); @@ -8176,8 +7235,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8185,9 +7246,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8195,20 +7253,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->targetInstances->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $target_instances_scoped_list) { - // TODO: Change code below to process each ($name => $target_instances_scoped_list) element: - echo '
', $name, ' => ', var_export($target_instances_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $targetInstancesScopedList) { + // TODO: Change code below to process each (name => targetInstancesScopedList) element: + echo '
', $name, ' => ', var_export($targetInstancesScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -8223,8 +7277,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8232,9 +7288,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8242,18 +7295,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$targetInstance = '{MY-TARGET-INSTANCE}'; - +$targetInstance = ''; // TODO: Update placeholder value. $response = $service->targetInstances->delete($project, $zone, $targetInstance); @@ -8269,8 +7318,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8278,9 +7329,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8288,18 +7336,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$targetInstance = '{MY-TARGET-INSTANCE}'; - +$targetInstance = ''; // TODO: Update placeholder value. $response = $service->targetInstances->get($project, $zone, $targetInstance); @@ -8315,8 +7359,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8324,9 +7370,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8334,19 +7377,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetInstance(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetInstances->insert($project, $zone, $requestBody); @@ -8362,8 +7400,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8371,9 +7411,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8381,23 +7418,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listTargetInstances` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->targetInstances->listTargetInstances($project, $zone, $optParams); - foreach ($response['items'] as $target_instance) { - // TODO: Change code below to process each `target_instance` resource: - echo '
', var_export($target_instance, true), '
', "\n"; + foreach ($response['items'] as $targetInstance) { + // TODO: Change code below to process each `targetInstance` resource: + echo '
', var_export($targetInstance, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -8412,8 +7445,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8421,9 +7456,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8431,22 +7463,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `addHealthCheck` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetPoolsAddHealthCheckRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->addHealthCheck($project, $region, $targetPool, $requestBody); @@ -8462,8 +7489,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8471,9 +7500,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8481,22 +7507,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `addInstance` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetPoolsAddInstanceRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->addInstance($project, $region, $targetPool, $requestBody); @@ -8512,8 +7533,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8521,9 +7544,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8531,20 +7551,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->targetPools->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $target_pools_scoped_list) { - // TODO: Change code below to process each ($name => $target_pools_scoped_list) element: - echo '
', $name, ' => ', var_export($target_pools_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $targetPoolsScopedList) { + // TODO: Change code below to process each (name => targetPoolsScopedList) element: + echo '
', $name, ' => ', var_export($targetPoolsScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -8559,8 +7575,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8568,9 +7586,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8578,18 +7593,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. $response = $service->targetPools->delete($project, $region, $targetPool); @@ -8605,8 +7616,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8614,9 +7627,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8624,18 +7634,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. $response = $service->targetPools->get($project, $region, $targetPool); @@ -8651,8 +7657,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8660,9 +7668,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8670,22 +7675,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `getHealth` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_InstanceReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->getHealth($project, $region, $targetPool, $requestBody); @@ -8701,8 +7701,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8710,9 +7712,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8720,19 +7719,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetPool(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->insert($project, $region, $requestBody); @@ -8748,8 +7742,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8757,9 +7753,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8767,23 +7760,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listTargetPools` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->targetPools->listTargetPools($project, $region, $optParams); - foreach ($response['items'] as $target_pool) { - // TODO: Change code below to process each `target_pool` resource: - echo '
', var_export($target_pool, true), '
', "\n"; + foreach ($response['items'] as $targetPool) { + // TODO: Change code below to process each `targetPool` resource: + echo '
', var_export($targetPool, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -8798,8 +7787,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8807,9 +7798,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8817,22 +7805,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `removeHealthCheck` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetPoolsRemoveHealthCheckRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->removeHealthCheck($project, $region, $targetPool, $requestBody); @@ -8848,8 +7831,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8857,9 +7842,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8867,22 +7849,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `removeInstance` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetPoolsRemoveInstanceRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->removeInstance($project, $region, $targetPool, $requestBody); @@ -8898,8 +7875,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8907,9 +7886,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8917,22 +7893,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setBackup` 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. -$targetPool = '{MY-TARGET-POOL}'; - +$targetPool = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetReference(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetPools->setBackup($project, $region, $targetPool, $requestBody); @@ -8948,8 +7919,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -8957,9 +7930,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -8967,15 +7937,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetSslProxy resource to delete. -$targetSslProxy = '{MY-TARGET-SSL-PROXY}'; - +$targetSslProxy = ''; // TODO: Update placeholder value. $response = $service->targetSslProxies->delete($project, $targetSslProxy); @@ -8991,8 +7957,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9000,9 +7968,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9010,15 +7975,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the TargetSslProxy resource to return. -$targetSslProxy = '{MY-TARGET-SSL-PROXY}'; - +$targetSslProxy = ''; // TODO: Update placeholder value. $response = $service->targetSslProxies->get($project, $targetSslProxy); @@ -9034,8 +7995,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9043,9 +8006,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9053,16 +8013,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetSslProxy(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetSslProxies->insert($project, $requestBody); @@ -9078,8 +8033,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9087,9 +8044,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9097,20 +8051,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listTargetSslProxies` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->targetSslProxies->listTargetSslProxies($project, $optParams); - foreach ($response['items'] as $target_ssl_proxy) { - // TODO: Change code below to process each `target_ssl_proxy` resource: - echo '
', var_export($target_ssl_proxy, true), '
', "\n"; + foreach ($response['items'] as $targetSslProxy) { + // TODO: Change code below to process each `targetSslProxy` resource: + echo '
', var_export($targetSslProxy, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -9125,8 +8075,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9134,9 +8086,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9144,19 +8093,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setBackendService` 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. -$targetSslProxy = '{MY-TARGET-SSL-PROXY}'; - +$targetSslProxy = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetSslProxiesSetBackendServiceRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetSslProxies->setBackendService($project, $targetSslProxy, $requestBody); @@ -9172,8 +8116,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9181,9 +8127,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9191,19 +8134,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setProxyHeader` 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. -$targetSslProxy = '{MY-TARGET-SSL-PROXY}'; - +$targetSslProxy = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetSslProxiesSetProxyHeaderRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetSslProxies->setProxyHeader($project, $targetSslProxy, $requestBody); @@ -9219,8 +8157,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9228,9 +8168,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9238,19 +8175,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `setSslCertificates` 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. -$targetSslProxy = '{MY-TARGET-SSL-PROXY}'; - +$targetSslProxy = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetSslProxiesSetSslCertificatesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetSslProxies->setSslCertificates($project, $targetSslProxy, $requestBody); @@ -9266,8 +8198,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9275,9 +8209,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9285,20 +8216,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->targetVpnGateways->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $target_vpn_gateways_scoped_list) { - // TODO: Change code below to process each ($name => $target_vpn_gateways_scoped_list) element: - echo '
', $name, ' => ', var_export($target_vpn_gateways_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $targetVpnGatewaysScopedList) { + // TODO: Change code below to process each (name => targetVpnGatewaysScopedList) element: + echo '
', $name, ' => ', var_export($targetVpnGatewaysScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -9313,8 +8240,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9322,9 +8251,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9332,18 +8258,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$targetVpnGateway = '{MY-TARGET-VPN-GATEWAY}'; - +$targetVpnGateway = ''; // TODO: Update placeholder value. $response = $service->targetVpnGateways->delete($project, $region, $targetVpnGateway); @@ -9359,8 +8281,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9368,9 +8292,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9378,18 +8299,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$targetVpnGateway = '{MY-TARGET-VPN-GATEWAY}'; - +$targetVpnGateway = ''; // TODO: Update placeholder value. $response = $service->targetVpnGateways->get($project, $region, $targetVpnGateway); @@ -9405,8 +8322,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9414,9 +8333,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9424,19 +8340,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_TargetVpnGateway(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetVpnGateways->insert($project, $region, $requestBody); @@ -9452,8 +8363,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9461,9 +8374,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9471,23 +8381,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listTargetVpnGateways` 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. -$optParams = array(); +$optParams = []; do { $response = $service->targetVpnGateways->listTargetVpnGateways($project, $region, $optParams); - foreach ($response['items'] as $target_vpn_gateway) { - // TODO: Change code below to process each `target_vpn_gateway` resource: - echo '
', var_export($target_vpn_gateway, true), '
', "\n"; + foreach ($response['items'] as $targetVpnGateway) { + // TODO: Change code below to process each `targetVpnGateway` resource: + echo '
', var_export($targetVpnGateway, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -9502,8 +8408,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9511,9 +8419,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9521,15 +8426,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the UrlMap resource to delete. -$urlMap = '{MY-URL-MAP}'; - +$urlMap = ''; // TODO: Update placeholder value. $response = $service->urlMaps->delete($project, $urlMap); @@ -9545,8 +8446,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9554,9 +8457,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9564,15 +8464,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the UrlMap resource to return. -$urlMap = '{MY-URL-MAP}'; - +$urlMap = ''; // TODO: Update placeholder value. $response = $service->urlMaps->get($project, $urlMap); @@ -9588,8 +8484,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9597,9 +8495,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9607,16 +8502,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_UrlMap(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->urlMaps->insert($project, $requestBody); @@ -9632,8 +8522,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9641,9 +8533,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9651,19 +8540,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `invalidateCache` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the UrlMap scoping this request. -$urlMap = '{MY-URL-MAP}'; - +$urlMap = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_CacheInvalidationRule(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->urlMaps->invalidateCache($project, $urlMap, $requestBody); @@ -9679,8 +8563,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9688,9 +8574,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9698,20 +8581,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listUrlMaps` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->urlMaps->listUrlMaps($project, $optParams); - foreach ($response['items'] as $url_map) { - // TODO: Change code below to process each `url_map` resource: - echo '
', var_export($url_map, true), '
', "\n"; + foreach ($response['items'] as $urlMap) { + // TODO: Change code below to process each `urlMap` resource: + echo '
', var_export($urlMap, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -9726,8 +8605,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9735,9 +8616,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9745,19 +8623,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the UrlMap resource to update. -$urlMap = '{MY-URL-MAP}'; - +$urlMap = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Compute_UrlMap(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->urlMaps->patch($project, $urlMap, $requestBody); @@ -9773,8 +8647,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9782,9 +8658,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9792,19 +8665,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the UrlMap resource to update. -$urlMap = '{MY-URL-MAP}'; - +$urlMap = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_UrlMap(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->urlMaps->update($project, $urlMap, $requestBody); @@ -9820,8 +8688,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9829,9 +8699,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9839,19 +8706,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `validate` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // Name of the UrlMap resource to be validated as. -$urlMap = '{MY-URL-MAP}'; - +$urlMap = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Compute_UrlMapsValidateRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->urlMaps->validate($project, $urlMap, $requestBody); @@ -9867,8 +8729,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9876,9 +8740,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9886,20 +8747,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `aggregatedList` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->vpnTunnels->aggregatedList($project, $optParams); - foreach ($response['items'] as $name => $vpn_tunnels_scoped_list) { - // TODO: Change code below to process each ($name => $vpn_tunnels_scoped_list) element: - echo '
', $name, ' => ', var_export($vpn_tunnels_scoped_list, true), '
', "\n"; + foreach ($response['items'] as $name => $vpnTunnelsScopedList) { + // TODO: Change code below to process each (name => vpnTunnelsScopedList) element: + echo '
', $name, ' => ', var_export($vpnTunnelsScopedList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -9914,8 +8771,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9923,9 +8782,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9933,18 +8789,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$vpnTunnel = '{MY-VPN-TUNNEL}'; - +$vpnTunnel = ''; // TODO: Update placeholder value. $response = $service->vpnTunnels->delete($project, $region, $vpnTunnel); @@ -9960,8 +8812,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -9969,9 +8823,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -9979,18 +8830,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$vpnTunnel = '{MY-VPN-TUNNEL}'; - +$vpnTunnel = ''; // TODO: Update placeholder value. $response = $service->vpnTunnels->get($project, $region, $vpnTunnel); @@ -10006,8 +8853,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10015,9 +8864,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10025,19 +8871,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Compute_VpnTunnel(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->vpnTunnels->insert($project, $region, $requestBody); @@ -10053,8 +8894,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10062,9 +8905,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10072,23 +8912,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listVpnTunnels` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->vpnTunnels->listVpnTunnels($project, $region, $optParams); - foreach ($response['items'] as $vpn_tunnel) { - // TODO: Change code below to process each `vpn_tunnel` resource: - echo '
', var_export($vpn_tunnel, true), '
', "\n"; + foreach ($response['items'] as $vpnTunnel) { + // TODO: Change code below to process each `vpnTunnel` resource: + echo '
', var_export($vpnTunnel, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -10103,8 +8939,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10112,9 +8950,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10122,18 +8957,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->zoneOperations->delete($project, $zone, $operation); ?> @@ -10146,8 +8977,10 @@ $service->zoneOperations->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10155,9 +8988,6 @@ $service->zoneOperations->delete($project, $zone, $operation); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10165,18 +8995,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->zoneOperations->get($project, $zone, $operation); @@ -10192,8 +9018,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10201,9 +9029,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10211,17 +9036,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `listZoneOperations` 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. -$optParams = array(); +$optParams = []; do { $response = $service->zoneOperations->listZoneOperations($project, $zone, $optParams); @@ -10242,8 +9063,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10251,9 +9074,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10261,15 +9081,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->zones->get($project, $zone); @@ -10285,8 +9101,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -10294,9 +9112,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ComputeSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -10304,14 +9119,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Compute($client); - -// TODO: Change placeholder below to desired parameter value for the `listZones` method: - // Project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->zones->listZones($project, $optParams); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_container.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_container.v1.json.baseline index c0a4ddc96f..8b87d57cac 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_container.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_container.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,21 +26,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `create` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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 properties of `requestBody`: $requestBody = new Google_Service_Container_CreateClusterRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_zones_clusters->create($projectId, $zone, $requestBody); @@ -57,8 +51,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -66,9 +62,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -76,20 +69,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; - +$clusterId = ''; // TODO: Update placeholder value. $response = $service->projects_zones_clusters->delete($projectId, $zone, $clusterId); @@ -105,8 +94,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -114,9 +105,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -124,20 +112,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; - +$clusterId = ''; // TODO: Update placeholder value. $response = $service->projects_zones_clusters->get($projectId, $zone, $clusterId); @@ -153,8 +137,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -162,9 +148,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -172,17 +155,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `listProjectsZonesClusters` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. $response = $service->projects_zones_clusters->listProjectsZonesClusters($projectId, $zone); @@ -198,8 +177,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -207,9 +188,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -217,24 +195,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `create` method: - // The Google Developers Console [project ID or project number] // (https://developers.google.com/console/help/new/#projectnumber). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; - +$clusterId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Container_CreateNodePoolRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_zones_clusters_nodePools->create($projectId, $zone, $clusterId, $requestBody); @@ -250,8 +223,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -259,9 +234,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -269,23 +241,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // The Google Developers Console [project ID or project number] // (https://developers.google.com/console/help/new/#projectnumber). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; +$clusterId = ''; // TODO: Update placeholder value. // The name of the node pool to delete. -$nodePoolId = '{MY-NODE-POOL-ID}'; - +$nodePoolId = ''; // TODO: Update placeholder value. $response = $service->projects_zones_clusters_nodePools->delete($projectId, $zone, $clusterId, $nodePoolId); @@ -301,8 +269,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -310,9 +280,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -320,23 +287,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The Google Developers Console [project ID or project number] // (https://developers.google.com/console/help/new/#projectnumber). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; +$clusterId = ''; // TODO: Update placeholder value. // The name of the node pool. -$nodePoolId = '{MY-NODE-POOL-ID}'; - +$nodePoolId = ''; // TODO: Update placeholder value. $response = $service->projects_zones_clusters_nodePools->get($projectId, $zone, $clusterId, $nodePoolId); @@ -352,8 +315,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -361,9 +326,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -371,20 +333,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `listProjectsZonesClustersNodePools` method: - // The Google Developers Console [project ID or project number] // (https://developers.google.com/console/help/new/#projectnumber). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; - +$clusterId = ''; // TODO: Update placeholder value. $response = $service->projects_zones_clusters_nodePools->listProjectsZonesClustersNodePools($projectId, $zone, $clusterId); @@ -400,8 +358,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -409,9 +369,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -419,24 +376,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$clusterId = '{MY-CLUSTER-ID}'; - +$clusterId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Container_UpdateClusterRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_zones_clusters->update($projectId, $zone, $clusterId, $requestBody); @@ -452,8 +404,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -461,9 +415,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -471,17 +422,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `getServerconfig` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. $response = $service->projects_zones->getServerconfig($projectId, $zone); @@ -497,8 +444,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -506,9 +455,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -516,20 +462,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. -$operationId = '{MY-OPERATION-ID}'; - +$operationId = ''; // TODO: Update placeholder value. $response = $service->projects_zones_operations->get($projectId, $zone, $operationId); @@ -545,8 +487,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -554,9 +498,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ContainerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -564,17 +505,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Container($client); - -// TODO: Change placeholders below to desired parameter values for the `listProjectsZonesOperations` method: - // The Google Developers Console [project ID or project number] // (https://support.google.com/cloud/answer/6158840). -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // 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. $response = $service->projects_zones_operations->listProjectsZonesOperations($projectId, $zone); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dataflow.v1b3.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dataflow.v1b3.json.baseline index 1d7e3cb873..dfddb55d12 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dataflow.v1b3.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dataflow.v1b3.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,16 +26,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholder below to desired parameter value for the `create` method: - // The project which owns the job. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_Job(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_jobs->create($projectId, $requestBody); @@ -52,8 +46,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -61,9 +57,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -71,19 +64,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `getConfig` method: - // The project id. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // The job id. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_GetDebugConfigRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_jobs_debug->getConfig($projectId, $jobId, $requestBody); @@ -99,8 +87,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -108,9 +98,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -118,19 +105,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `sendCapture` method: - // The project id. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // The job id. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_SendDebugCaptureRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_jobs_debug->sendCapture($projectId, $jobId, $requestBody); @@ -146,8 +128,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -155,9 +139,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -165,15 +146,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The project which owns the job. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Identifies a single job. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. $response = $service->projects_jobs->get($projectId, $jobId); @@ -189,8 +166,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -198,9 +177,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -208,15 +184,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `getMetrics` method: - // A project id. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // The job to get messages for. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. $response = $service->projects_jobs->getMetrics($projectId, $jobId); @@ -232,8 +204,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -241,9 +215,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -251,14 +222,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsJobs` method: - // The project which owns the jobs. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->projects_jobs->listProjectsJobs($projectId, $optParams); @@ -279,8 +246,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -288,9 +257,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -298,23 +264,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `listProjectsJobsMessages` method: - // A project id. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // The job to get messages about. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->projects_jobs_messages->listProjectsJobsMessages($projectId, $jobId, $optParams); - foreach ($response['jobMessages'] as $job_message) { - // TODO: Change code below to process each `job_message` resource: - echo '
', var_export($job_message, true), '
', "\n"; + foreach ($response['jobMessages'] as $jobMessage) { + // TODO: Change code below to process each `jobMessage` resource: + echo '
', var_export($jobMessage, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -329,8 +291,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -338,9 +302,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -348,19 +309,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // The project which owns the job. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Identifies a single job. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_Job(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_jobs->update($projectId, $jobId, $requestBody); @@ -376,8 +332,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -385,9 +343,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -395,19 +350,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `lease` method: - // Identifies the project this worker belongs to. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // Identifies the workflow job this worker belongs to. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_LeaseWorkItemRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_jobs_workItems->lease($projectId, $jobId, $requestBody); @@ -423,8 +373,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -432,9 +384,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -442,19 +391,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholders below to desired parameter values for the `reportStatus` method: - // The project which owns the WorkItem's job. -$projectId = '{MY-PROJECT-ID}'; +$projectId = ''; // TODO: Update placeholder value. // The job which the WorkItem is part of. -$jobId = '{MY-JOB-ID}'; - +$jobId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_ReportWorkItemStatusRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_jobs_workItems->reportStatus($projectId, $jobId, $requestBody); @@ -470,8 +414,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -479,9 +425,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -489,16 +432,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholder below to desired parameter value for the `create` method: - // The project which owns the job. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_CreateJobFromTemplateRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_templates->create($projectId, $requestBody); @@ -514,8 +452,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -523,9 +463,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DataflowSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -533,16 +470,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dataflow($client); - -// TODO: Change placeholder below to desired parameter value for the `workerMessages` method: - // The project to send the WorkerMessages to. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dataflow_SendWorkerMessagesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->workerMessages($projectId, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_datastore.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_datastore.v1.json.baseline index ced38c5966..9a6d380e50 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_datastore.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_datastore.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DatastoreSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,16 +26,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Datastore($client); - -// TODO: Change placeholder below to desired parameter value for the `allocateIds` method: - // The ID of the project against which to make the request. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Datastore_AllocateIdsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->allocateIds($projectId, $requestBody); @@ -52,8 +46,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -61,9 +57,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DatastoreSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -71,16 +64,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Datastore($client); - -// TODO: Change placeholder below to desired parameter value for the `beginTransaction` method: - // The ID of the project against which to make the request. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Datastore_BeginTransactionRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->beginTransaction($projectId, $requestBody); @@ -96,8 +84,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -105,9 +95,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DatastoreSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -115,16 +102,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Datastore($client); - -// TODO: Change placeholder below to desired parameter value for the `commit` method: - // The ID of the project against which to make the request. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Datastore_CommitRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->commit($projectId, $requestBody); @@ -140,8 +122,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -149,9 +133,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DatastoreSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -159,16 +140,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Datastore($client); - -// TODO: Change placeholder below to desired parameter value for the `lookup` method: - // The ID of the project against which to make the request. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Datastore_LookupRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->lookup($projectId, $requestBody); @@ -184,8 +160,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -193,9 +171,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DatastoreSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -203,16 +178,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Datastore($client); - -// TODO: Change placeholder below to desired parameter value for the `rollback` method: - // The ID of the project against which to make the request. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Datastore_RollbackRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->rollback($projectId, $requestBody); @@ -228,8 +198,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -237,9 +209,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DatastoreSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -247,16 +216,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Datastore($client); - -// TODO: Change placeholder below to desired parameter value for the `runQuery` method: - // The ID of the project against which to make the request. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Datastore_RunQueryRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects->runQuery($projectId, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_deploymentmanager.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_deploymentmanager.v2.json.baseline index 11bd290e15..e5774e835f 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_deploymentmanager.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_deploymentmanager.v2.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,19 +26,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `cancelPreview` 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 properties of `requestBody`: $requestBody = new Google_Service_DeploymentManager_DeploymentsCancelPreviewRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->deployments->cancelPreview($project, $deployment, $requestBody); @@ -55,8 +49,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -64,9 +60,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -74,15 +67,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->deployments->delete($project, $deployment); @@ -98,8 +87,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -107,9 +98,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -117,15 +105,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->deployments->get($project, $deployment); @@ -141,8 +125,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -150,9 +136,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -160,15 +143,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `getIamPolicy` 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. $response = $service->deployments->getIamPolicy($project, $resource); @@ -184,8 +163,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -193,9 +174,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -203,16 +181,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // The project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_DeploymentManager_Deployment(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->deployments->insert($project, $requestBody); @@ -228,8 +201,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -237,9 +212,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -247,14 +219,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholder below to desired parameter value for the `listDeployments` method: - // The project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->deployments->listDeployments($project, $optParams); @@ -275,8 +243,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -284,9 +254,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -294,19 +261,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_DeploymentManager_Deployment(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->deployments->patch($project, $deployment, $requestBody); @@ -322,8 +285,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -331,9 +296,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -341,19 +303,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `setIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_DeploymentManager_Policy(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->deployments->setIamPolicy($project, $resource, $requestBody); @@ -369,8 +326,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -378,9 +337,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -388,19 +344,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `stop` 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 properties of `requestBody`: $requestBody = new Google_Service_DeploymentManager_DeploymentsStopRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->deployments->stop($project, $deployment, $requestBody); @@ -416,8 +367,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -425,9 +378,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -435,19 +385,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `testIamPermissions` 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 properties of `requestBody`: $requestBody = new Google_Service_DeploymentManager_TestPermissionsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->deployments->testIamPermissions($project, $resource, $requestBody); @@ -463,8 +408,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -472,9 +419,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -482,19 +426,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_DeploymentManager_Deployment(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->deployments->update($project, $deployment, $requestBody); @@ -510,8 +449,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -519,9 +460,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -529,18 +467,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->manifests->get($project, $deployment, $manifest); @@ -556,8 +490,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -565,9 +501,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -575,17 +508,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `listManifests` 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. -$optParams = array(); +$optParams = []; do { $response = $service->manifests->listManifests($project, $deployment, $optParams); @@ -606,8 +535,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -615,9 +546,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -625,15 +553,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->operations->get($project, $operation); @@ -649,8 +573,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -658,9 +584,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -668,14 +591,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholder below to desired parameter value for the `listOperations` method: - // The project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->operations->listOperations($project, $optParams); @@ -696,8 +615,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -705,9 +626,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -715,18 +633,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->resources->get($project, $deployment, $resource); @@ -742,8 +656,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -751,9 +667,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -761,17 +674,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholders below to desired parameter values for the `listResources` 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. -$optParams = array(); +$optParams = []; do { $response = $service->resources->listResources($project, $deployment, $optParams); @@ -792,8 +701,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -801,9 +712,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DeploymentManagerSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -811,14 +719,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_DeploymentManager($client); - -// TODO: Change placeholder below to desired parameter value for the `listTypes` method: - // The project ID for this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->types->listTypes($project, $optParams); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dfareporting.v2.6.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dfareporting.v2.6.json.baseline index 3f51f5b475..7a5b546a90 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dfareporting.v2.6.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dfareporting.v2.6.json.baseline @@ -17,15 +17,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Account ID. -$summaryAccountId = '0'; - +$summaryAccountId = '0'; // TODO: Update placeholder value. $response = $service->accountActiveAdSummaries->get($profileId, $summaryAccountId); @@ -33,10 +29,10 @@ $response = $service->accountActiveAdSummaries->get($profileId, $summaryAccountI echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -59,15 +55,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Account permission group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->accountPermissionGroups->get($profileId, $id); @@ -75,10 +67,10 @@ $response = $service->accountPermissionGroups->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -101,12 +93,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAccountPermissionGroups` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->accountPermissionGroups->listAccountPermissionGroups($profileId); @@ -114,10 +102,10 @@ $response = $service->accountPermissionGroups->listAccountPermissionGroups($prof echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listAccountPermissionGroups` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -140,15 +128,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Account permission ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->accountPermissions->get($profileId, $id); @@ -156,10 +140,10 @@ $response = $service->accountPermissions->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -182,12 +166,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAccountPermissions` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->accountPermissions->listAccountPermissions($profileId); @@ -195,10 +175,10 @@ $response = $service->accountPermissions->listAccountPermissions($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listAccountPermissions` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -221,15 +201,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User profile ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->accountUserProfiles->get($profileId, $id); @@ -237,10 +213,10 @@ $response = $service->accountUserProfiles->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -263,16 +239,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_AccountUserProfile(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->accountUserProfiles->insert($profileId, $requestBody); @@ -280,10 +251,10 @@ $response = $service->accountUserProfiles->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -306,30 +277,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAccountUserProfiles` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->accountUserProfiles->listAccountUserProfiles($profileId, $optParams); - foreach ($response['accountUserProfiles'] as $account_user_profile) { - // TODO: Change code below to process each `account_user_profile` resource: - echo '
', var_export($account_user_profile, true), '
', "\n"; + foreach ($response['accountUserProfiles'] as $accountUserProfile) { + // TODO: Change code below to process each `accountUserProfile` resource: + echo '
', var_export($accountUserProfile, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listAccountUserProfiles` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -352,19 +319,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User profile ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_AccountUserProfile(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->accountUserProfiles->patch($profileId, $id, $requestBody); @@ -372,10 +335,10 @@ $response = $service->accountUserProfiles->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -398,16 +361,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_AccountUserProfile(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->accountUserProfiles->update($profileId, $requestBody); @@ -415,10 +373,10 @@ $response = $service->accountUserProfiles->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -441,15 +399,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Account ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->accounts->get($profileId, $id); @@ -457,10 +411,10 @@ $response = $service->accounts->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -483,14 +437,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAccounts` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->accounts->listAccounts($profileId, $optParams); @@ -503,10 +453,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listAccounts` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -529,19 +479,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Account ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Account(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->accounts->patch($profileId, $id, $requestBody); @@ -549,10 +495,10 @@ $response = $service->accounts->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -575,16 +521,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Account(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->accounts->update($profileId, $requestBody); @@ -592,10 +533,10 @@ $response = $service->accounts->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -618,15 +559,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Ad ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->ads->get($profileId, $id); @@ -634,10 +571,10 @@ $response = $service->ads->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -660,16 +597,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Ad(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->ads->insert($profileId, $requestBody); @@ -677,10 +609,10 @@ $response = $service->ads->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -703,14 +635,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAds` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->ads->listAds($profileId, $optParams); @@ -723,10 +651,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listAds` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -749,19 +677,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Ad ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Ad(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->ads->patch($profileId, $id, $requestBody); @@ -769,10 +693,10 @@ $response = $service->ads->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -795,16 +719,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Ad(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->ads->update($profileId, $requestBody); @@ -812,10 +731,10 @@ $response = $service->ads->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -838,23 +757,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Advertiser group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->advertiserGroups->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -877,15 +792,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Advertiser group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->advertiserGroups->get($profileId, $id); @@ -893,10 +804,10 @@ $response = $service->advertiserGroups->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -919,16 +830,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_AdvertiserGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->advertiserGroups->insert($profileId, $requestBody); @@ -936,10 +842,10 @@ $response = $service->advertiserGroups->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -962,30 +868,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAdvertiserGroups` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->advertiserGroups->listAdvertiserGroups($profileId, $optParams); - foreach ($response['advertiserGroups'] as $advertiser_group) { - // TODO: Change code below to process each `advertiser_group` resource: - echo '
', var_export($advertiser_group, true), '
', "\n"; + foreach ($response['advertiserGroups'] as $advertiserGroup) { + // TODO: Change code below to process each `advertiserGroup` resource: + echo '
', var_export($advertiserGroup, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listAdvertiserGroups` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1008,19 +910,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Advertiser group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_AdvertiserGroup(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->advertiserGroups->patch($profileId, $id, $requestBody); @@ -1028,10 +926,10 @@ $response = $service->advertiserGroups->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1054,16 +952,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_AdvertiserGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->advertiserGroups->update($profileId, $requestBody); @@ -1071,10 +964,10 @@ $response = $service->advertiserGroups->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1097,15 +990,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Advertiser ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->advertisers->get($profileId, $id); @@ -1113,10 +1002,10 @@ $response = $service->advertisers->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1139,16 +1028,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Advertiser(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->advertisers->insert($profileId, $requestBody); @@ -1156,10 +1040,10 @@ $response = $service->advertisers->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1182,14 +1066,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listAdvertisers` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->advertisers->listAdvertisers($profileId, $optParams); @@ -1202,10 +1082,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listAdvertisers` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1228,19 +1108,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Advertiser ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Advertiser(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->advertisers->patch($profileId, $id, $requestBody); @@ -1248,10 +1124,10 @@ $response = $service->advertisers->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1274,16 +1150,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Advertiser(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->advertisers->update($profileId, $requestBody); @@ -1291,10 +1162,10 @@ $response = $service->advertisers->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1317,12 +1188,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listBrowsers` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->browsers->listBrowsers($profileId); @@ -1330,10 +1197,10 @@ $response = $service->browsers->listBrowsers($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listBrowsers` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1356,19 +1223,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Campaign ID in this association. -$campaignId = '0'; - +$campaignId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CampaignCreativeAssociation(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->campaignCreativeAssociations->insert($profileId, $campaignId, $requestBody); @@ -1376,10 +1238,10 @@ $response = $service->campaignCreativeAssociations->insert($profileId, $campaign echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1402,33 +1264,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listCampaignCreativeAssociations` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Campaign ID in this association. -$campaignId = '0'; +$campaignId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->campaignCreativeAssociations->listCampaignCreativeAssociations($profileId, $campaignId, $optParams); - foreach ($response['campaignCreativeAssociations'] as $campaign_creative_association) { - // TODO: Change code below to process each `campaign_creative_association` resource: - echo '
', var_export($campaign_creative_association, true), '
', "\n"; + foreach ($response['campaignCreativeAssociations'] as $campaignCreativeAssociation) { + // TODO: Change code below to process each `campaignCreativeAssociation` resource: + echo '
', var_export($campaignCreativeAssociation, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listCampaignCreativeAssociations` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1451,15 +1309,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Campaign ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->campaigns->get($profileId, $id); @@ -1467,10 +1321,10 @@ $response = $service->campaigns->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1493,22 +1347,17 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Default landing page name for this new campaign. Must be less than 256 characters long. -$defaultLandingPageName = '{MY-DEFAULT-LANDING-PAGE-NAME}'; +$defaultLandingPageName = ''; // TODO: Update placeholder value. // Default landing page URL for this new campaign. -$defaultLandingPageUrl = '{MY-DEFAULT-LANDING-PAGE-URL}'; - +$defaultLandingPageUrl = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Campaign(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->campaigns->insert($profileId, $defaultLandingPageName, $defaultLandingPageUrl, $requestBody); @@ -1516,10 +1365,10 @@ $response = $service->campaigns->insert($profileId, $defaultLandingPageName, $de echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1542,14 +1391,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listCampaigns` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->campaigns->listCampaigns($profileId, $optParams); @@ -1562,10 +1407,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listCampaigns` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1588,19 +1433,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Campaign ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Campaign(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->campaigns->patch($profileId, $id, $requestBody); @@ -1608,10 +1449,10 @@ $response = $service->campaigns->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1634,16 +1475,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Campaign(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->campaigns->update($profileId, $requestBody); @@ -1651,10 +1487,10 @@ $response = $service->campaigns->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1677,15 +1513,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Change log ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->changeLogs->get($profileId, $id); @@ -1693,10 +1525,10 @@ $response = $service->changeLogs->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1719,30 +1551,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listChangeLogs` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->changeLogs->listChangeLogs($profileId, $optParams); - foreach ($response['changeLogs'] as $change_log) { - // TODO: Change code below to process each `change_log` resource: - echo '
', var_export($change_log, true), '
', "\n"; + foreach ($response['changeLogs'] as $changeLog) { + // TODO: Change code below to process each `changeLog` resource: + echo '
', var_export($changeLog, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listChangeLogs` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1765,12 +1593,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listCities` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->cities->listCities($profileId); @@ -1778,10 +1602,10 @@ $response = $service->cities->listCities($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listCities` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1804,15 +1628,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Connection type ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->connectionTypes->get($profileId, $id); @@ -1820,10 +1640,10 @@ $response = $service->connectionTypes->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1846,12 +1666,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listConnectionTypes` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->connectionTypes->listConnectionTypes($profileId); @@ -1859,10 +1675,10 @@ $response = $service->connectionTypes->listConnectionTypes($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listConnectionTypes` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1885,23 +1701,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Content category ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->contentCategories->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1924,15 +1736,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Content category ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->contentCategories->get($profileId, $id); @@ -1940,10 +1748,10 @@ $response = $service->contentCategories->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -1966,16 +1774,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_ContentCategory(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->contentCategories->insert($profileId, $requestBody); @@ -1983,10 +1786,10 @@ $response = $service->contentCategories->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2009,30 +1812,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listContentCategories` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->contentCategories->listContentCategories($profileId, $optParams); - foreach ($response['contentCategories'] as $content_category) { - // TODO: Change code below to process each `content_category` resource: - echo '
', var_export($content_category, true), '
', "\n"; + foreach ($response['contentCategories'] as $contentCategory) { + // TODO: Change code below to process each `contentCategory` resource: + echo '
', var_export($contentCategory, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listContentCategories` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2055,19 +1854,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Content category ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_ContentCategory(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->contentCategories->patch($profileId, $id, $requestBody); @@ -2075,10 +1870,10 @@ $response = $service->contentCategories->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2101,16 +1896,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_ContentCategory(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->contentCategories->update($profileId, $requestBody); @@ -2118,10 +1908,10 @@ $response = $service->contentCategories->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2144,16 +1934,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `batchinsert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_ConversionsBatchInsertRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->conversions->batchinsert($profileId, $requestBody); @@ -2161,10 +1946,10 @@ $response = $service->conversions->batchinsert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/ddmconversions return null; } @@ -2187,15 +1972,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Country DART ID. -$dartId = '0'; - +$dartId = '0'; // TODO: Update placeholder value. $response = $service->countries->get($profileId, $dartId); @@ -2203,10 +1984,10 @@ $response = $service->countries->get($profileId, $dartId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2229,12 +2010,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listCountries` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->countries->listCountries($profileId); @@ -2242,10 +2019,10 @@ $response = $service->countries->listCountries($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listCountries` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2268,34 +2045,28 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Advertiser ID of this creative. This is a required field. -$advertiserId = '0'; - +$advertiserId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeAssetMetadata(); -// TODO: Assign values to desired properties of the `requestBody` object. - // TODO: Add desired media content for upload. For more information, see: // https://developers.google.com/api-client-library/php/guide/media_upload - $response = $service->creativeAssets->insert($profileId, $advertiserId, $requestBody); // TODO: Change code below to process the `response` object: echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2318,26 +2089,22 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative field ID for this creative field value. -$creativeFieldId = '0'; +$creativeFieldId = '0'; // TODO: Update placeholder value. // Creative Field Value ID -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->creativeFieldValues->delete($profileId, $creativeFieldId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2360,18 +2127,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative field ID for this creative field value. -$creativeFieldId = '0'; +$creativeFieldId = '0'; // TODO: Update placeholder value. // Creative Field Value ID -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->creativeFieldValues->get($profileId, $creativeFieldId, $id); @@ -2379,10 +2142,10 @@ $response = $service->creativeFieldValues->get($profileId, $creativeFieldId, $id echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2405,19 +2168,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative field ID for this creative field value. -$creativeFieldId = '0'; - +$creativeFieldId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeFieldValue(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creativeFieldValues->insert($profileId, $creativeFieldId, $requestBody); @@ -2425,10 +2183,10 @@ $response = $service->creativeFieldValues->insert($profileId, $creativeFieldId, echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2451,33 +2209,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listCreativeFieldValues` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative field ID for this creative field value. -$creativeFieldId = '0'; - +$creativeFieldId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->creativeFieldValues->listCreativeFieldValues($profileId, $creativeFieldId, $optParams); - foreach ($response['creativeFieldValues'] as $creative_field_value) { - // TODO: Change code below to process each `creative_field_value` resource: - echo '
', var_export($creative_field_value, true), '
', "\n"; + foreach ($response['creativeFieldValues'] as $creativeFieldValue) { + // TODO: Change code below to process each `creativeFieldValue` resource: + echo '
', var_export($creativeFieldValue, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listCreativeFieldValues` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2500,22 +2254,18 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative field ID for this creative field value. -$creativeFieldId = '0'; +$creativeFieldId = '0'; // TODO: Update placeholder value. // Creative Field Value ID -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_CreativeFieldValue(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->creativeFieldValues->patch($profileId, $creativeFieldId, $id, $requestBody); @@ -2523,10 +2273,10 @@ $response = $service->creativeFieldValues->patch($profileId, $creativeFieldId, $ echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2549,19 +2299,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative field ID for this creative field value. -$creativeFieldId = '0'; - +$creativeFieldId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeFieldValue(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creativeFieldValues->update($profileId, $creativeFieldId, $requestBody); @@ -2569,10 +2314,10 @@ $response = $service->creativeFieldValues->update($profileId, $creativeFieldId, echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2595,23 +2340,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative Field ID -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->creativeFields->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2634,15 +2375,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative Field ID -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->creativeFields->get($profileId, $id); @@ -2650,10 +2387,10 @@ $response = $service->creativeFields->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2676,16 +2413,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeField(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creativeFields->insert($profileId, $requestBody); @@ -2693,10 +2425,10 @@ $response = $service->creativeFields->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2719,30 +2451,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listCreativeFields` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->creativeFields->listCreativeFields($profileId, $optParams); - foreach ($response['creativeFields'] as $creative_field) { - // TODO: Change code below to process each `creative_field` resource: - echo '
', var_export($creative_field, true), '
', "\n"; + foreach ($response['creativeFields'] as $creativeField) { + // TODO: Change code below to process each `creativeField` resource: + echo '
', var_export($creativeField, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listCreativeFields` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2765,19 +2493,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative Field ID -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_CreativeField(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->creativeFields->patch($profileId, $id, $requestBody); @@ -2785,10 +2509,10 @@ $response = $service->creativeFields->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2811,16 +2535,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeField(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creativeFields->update($profileId, $requestBody); @@ -2828,10 +2547,10 @@ $response = $service->creativeFields->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2854,15 +2573,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->creativeGroups->get($profileId, $id); @@ -2870,10 +2585,10 @@ $response = $service->creativeGroups->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2896,16 +2611,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creativeGroups->insert($profileId, $requestBody); @@ -2913,10 +2623,10 @@ $response = $service->creativeGroups->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2939,30 +2649,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listCreativeGroups` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->creativeGroups->listCreativeGroups($profileId, $optParams); - foreach ($response['creativeGroups'] as $creative_group) { - // TODO: Change code below to process each `creative_group` resource: - echo '
', var_export($creative_group, true), '
', "\n"; + foreach ($response['creativeGroups'] as $creativeGroup) { + // TODO: Change code below to process each `creativeGroup` resource: + echo '
', var_export($creativeGroup, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listCreativeGroups` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -2985,19 +2691,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_CreativeGroup(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->creativeGroups->patch($profileId, $id, $requestBody); @@ -3005,10 +2707,10 @@ $response = $service->creativeGroups->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3031,16 +2733,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_CreativeGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creativeGroups->update($profileId, $requestBody); @@ -3048,10 +2745,10 @@ $response = $service->creativeGroups->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3074,15 +2771,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->creatives->get($profileId, $id); @@ -3090,10 +2783,10 @@ $response = $service->creatives->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3116,16 +2809,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Creative(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creatives->insert($profileId, $requestBody); @@ -3133,10 +2821,10 @@ $response = $service->creatives->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3159,14 +2847,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listCreatives` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->creatives->listCreatives($profileId, $optParams); @@ -3179,10 +2863,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listCreatives` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3205,19 +2889,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Creative ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Creative(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->creatives->patch($profileId, $id, $requestBody); @@ -3225,10 +2905,10 @@ $response = $service->creatives->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3251,16 +2931,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Creative(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->creatives->update($profileId, $requestBody); @@ -3268,10 +2943,10 @@ $response = $service->creatives->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3294,34 +2969,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `query` method: - // The DFA user profile ID. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_DimensionValueRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->dimensionValues->query($profileId, $requestBody, $optParams); - foreach ($response['items'] as $dimension_value) { - // TODO: Change code below to process each `dimension_value` resource: - echo '
', var_export($dimension_value, true), '
', "\n"; + foreach ($response['items'] as $dimensionValue) { + // TODO: Change code below to process each `dimensionValue` resource: + echo '
', var_export($dimensionValue, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -3344,15 +3014,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Directory site contact ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->directorySiteContacts->get($profileId, $id); @@ -3360,10 +3026,10 @@ $response = $service->directorySiteContacts->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3386,30 +3052,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listDirectorySiteContacts` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->directorySiteContacts->listDirectorySiteContacts($profileId, $optParams); - foreach ($response['directorySiteContacts'] as $directory_site_contact) { - // TODO: Change code below to process each `directory_site_contact` resource: - echo '
', var_export($directory_site_contact, true), '
', "\n"; + foreach ($response['directorySiteContacts'] as $directorySiteContact) { + // TODO: Change code below to process each `directorySiteContact` resource: + echo '
', var_export($directorySiteContact, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listDirectorySiteContacts` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3432,15 +3094,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Directory site ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->directorySites->get($profileId, $id); @@ -3448,10 +3106,10 @@ $response = $service->directorySites->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3474,16 +3132,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_DirectorySite(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->directorySites->insert($profileId, $requestBody); @@ -3491,10 +3144,10 @@ $response = $service->directorySites->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3517,30 +3170,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listDirectorySites` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->directorySites->listDirectorySites($profileId, $optParams); - foreach ($response['directorySites'] as $directory_site) { - // TODO: Change code below to process each `directory_site` resource: - echo '
', var_export($directory_site, true), '
', "\n"; + foreach ($response['directorySites'] as $directorySite) { + // TODO: Change code below to process each `directorySite` resource: + echo '
', var_export($directorySite, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listDirectorySites` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3563,30 +3212,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // ID of the object of this dynamic targeting key. This is a required field. -$objectId = '0'; +$objectId = '0'; // 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. -$objectType = '{MY-OBJECT-TYPE}'; - +$objectType = ''; // TODO: Update placeholder value. $service->dynamicTargetingKeys->delete($profileId, $objectId, $name, $objectType); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3609,16 +3254,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_DynamicTargetingKey(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->dynamicTargetingKeys->insert($profileId, $requestBody); @@ -3626,10 +3266,10 @@ $response = $service->dynamicTargetingKeys->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3652,12 +3292,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listDynamicTargetingKeys` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->dynamicTargetingKeys->listDynamicTargetingKeys($profileId); @@ -3665,10 +3301,10 @@ $response = $service->dynamicTargetingKeys->listDynamicTargetingKeys($profileId) echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listDynamicTargetingKeys` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3691,23 +3327,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Event tag ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->eventTags->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3730,15 +3362,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Event tag ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->eventTags->get($profileId, $id); @@ -3746,10 +3374,10 @@ $response = $service->eventTags->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3772,16 +3400,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_EventTag(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->eventTags->insert($profileId, $requestBody); @@ -3789,10 +3412,10 @@ $response = $service->eventTags->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3815,12 +3438,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listEventTags` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->eventTags->listEventTags($profileId); @@ -3828,10 +3447,10 @@ $response = $service->eventTags->listEventTags($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listEventTags` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3854,19 +3473,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Event tag ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_EventTag(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->eventTags->patch($profileId, $id, $requestBody); @@ -3874,10 +3489,10 @@ $response = $service->eventTags->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3900,16 +3515,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_EventTag(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->eventTags->update($profileId, $requestBody); @@ -3917,10 +3527,10 @@ $response = $service->eventTags->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -3943,17 +3553,13 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The ID of the report. -$reportId = '0'; +$reportId = '0'; // TODO: Update placeholder value. // The ID of the report file. -$fileId = '0'; - +$fileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; // TODO: To download media content, use: // @@ -3965,10 +3571,10 @@ $response = $service->files->get($reportId, $fileId, $optParams); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -3991,14 +3597,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listFiles` method: - // The DFA profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->files->listFiles($profileId, $optParams); @@ -4011,10 +3613,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listFiles` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -4037,23 +3639,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight activity ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->floodlightActivities->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4076,12 +3674,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `generatetag` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->floodlightActivities->generatetag($profileId); @@ -4089,10 +3683,10 @@ $response = $service->floodlightActivities->generatetag($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `generatetag` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4115,15 +3709,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight activity ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->floodlightActivities->get($profileId, $id); @@ -4131,10 +3721,10 @@ $response = $service->floodlightActivities->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4157,16 +3747,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_FloodlightActivity(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->floodlightActivities->insert($profileId, $requestBody); @@ -4174,10 +3759,10 @@ $response = $service->floodlightActivities->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4200,30 +3785,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listFloodlightActivities` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->floodlightActivities->listFloodlightActivities($profileId, $optParams); - foreach ($response['floodlightActivities'] as $floodlight_activity) { - // TODO: Change code below to process each `floodlight_activity` resource: - echo '
', var_export($floodlight_activity, true), '
', "\n"; + foreach ($response['floodlightActivities'] as $floodlightActivity) { + // TODO: Change code below to process each `floodlightActivity` resource: + echo '
', var_export($floodlightActivity, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listFloodlightActivities` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4246,19 +3827,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight activity ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_FloodlightActivity(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->floodlightActivities->patch($profileId, $id, $requestBody); @@ -4266,10 +3843,10 @@ $response = $service->floodlightActivities->patch($profileId, $id, $requestBody) echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4292,16 +3869,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_FloodlightActivity(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->floodlightActivities->update($profileId, $requestBody); @@ -4309,10 +3881,10 @@ $response = $service->floodlightActivities->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4335,15 +3907,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight activity Group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->floodlightActivityGroups->get($profileId, $id); @@ -4351,10 +3919,10 @@ $response = $service->floodlightActivityGroups->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4377,16 +3945,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_FloodlightActivityGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->floodlightActivityGroups->insert($profileId, $requestBody); @@ -4394,10 +3957,10 @@ $response = $service->floodlightActivityGroups->insert($profileId, $requestBody) echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4420,30 +3983,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listFloodlightActivityGroups` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->floodlightActivityGroups->listFloodlightActivityGroups($profileId, $optParams); - foreach ($response['floodlightActivityGroups'] as $floodlight_activity_group) { - // TODO: Change code below to process each `floodlight_activity_group` resource: - echo '
', var_export($floodlight_activity_group, true), '
', "\n"; + foreach ($response['floodlightActivityGroups'] as $floodlightActivityGroup) { + // TODO: Change code below to process each `floodlightActivityGroup` resource: + echo '
', var_export($floodlightActivityGroup, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listFloodlightActivityGroups` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4466,19 +4025,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight activity Group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_FloodlightActivityGroup(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->floodlightActivityGroups->patch($profileId, $id, $requestBody); @@ -4486,10 +4041,10 @@ $response = $service->floodlightActivityGroups->patch($profileId, $id, $requestB echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4512,16 +4067,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_FloodlightActivityGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->floodlightActivityGroups->update($profileId, $requestBody); @@ -4529,10 +4079,10 @@ $response = $service->floodlightActivityGroups->update($profileId, $requestBody) echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4555,15 +4105,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight configuration ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->floodlightConfigurations->get($profileId, $id); @@ -4571,10 +4117,10 @@ $response = $service->floodlightConfigurations->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4597,12 +4143,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listFloodlightConfigurations` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->floodlightConfigurations->listFloodlightConfigurations($profileId); @@ -4610,10 +4152,10 @@ $response = $service->floodlightConfigurations->listFloodlightConfigurations($pr echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listFloodlightConfigurations` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4636,19 +4178,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Floodlight configuration ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_FloodlightConfiguration(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->floodlightConfigurations->patch($profileId, $id, $requestBody); @@ -4656,10 +4194,10 @@ $response = $service->floodlightConfigurations->patch($profileId, $id, $requestB echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4682,16 +4220,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_FloodlightConfiguration(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->floodlightConfigurations->update($profileId, $requestBody); @@ -4699,10 +4232,10 @@ $response = $service->floodlightConfigurations->update($profileId, $requestBody) echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4725,18 +4258,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID for order documents. -$projectId = '0'; +$projectId = '0'; // TODO: Update placeholder value. // Inventory item ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->inventoryItems->get($profileId, $projectId, $id); @@ -4744,10 +4273,10 @@ $response = $service->inventoryItems->get($profileId, $projectId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4770,33 +4299,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listInventoryItems` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID for order documents. -$projectId = '0'; - +$projectId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->inventoryItems->listInventoryItems($profileId, $projectId, $optParams); - foreach ($response['inventoryItems'] as $inventory_item) { - // TODO: Change code below to process each `inventory_item` resource: - echo '
', var_export($inventory_item, true), '
', "\n"; + foreach ($response['inventoryItems'] as $inventoryItem) { + // TODO: Change code below to process each `inventoryItem` resource: + echo '
', var_export($inventoryItem, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listInventoryItems` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4819,26 +4344,22 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Landing page campaign ID. -$campaignId = '0'; +$campaignId = '0'; // TODO: Update placeholder value. // Landing page ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->landingPages->delete($profileId, $campaignId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4861,18 +4382,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Landing page campaign ID. -$campaignId = '0'; +$campaignId = '0'; // TODO: Update placeholder value. // Landing page ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->landingPages->get($profileId, $campaignId, $id); @@ -4880,10 +4397,10 @@ $response = $service->landingPages->get($profileId, $campaignId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4906,19 +4423,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Landing page campaign ID. -$campaignId = '0'; - +$campaignId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_LandingPage(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->landingPages->insert($profileId, $campaignId, $requestBody); @@ -4926,10 +4438,10 @@ $response = $service->landingPages->insert($profileId, $campaignId, $requestBody echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4952,15 +4464,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listLandingPages` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Landing page campaign ID. -$campaignId = '0'; - +$campaignId = '0'; // TODO: Update placeholder value. $response = $service->landingPages->listLandingPages($profileId, $campaignId); @@ -4968,10 +4476,10 @@ $response = $service->landingPages->listLandingPages($profileId, $campaignId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listLandingPages` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -4994,22 +4502,18 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Landing page campaign ID. -$campaignId = '0'; +$campaignId = '0'; // TODO: Update placeholder value. // Landing page ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_LandingPage(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->landingPages->patch($profileId, $campaignId, $id, $requestBody); @@ -5017,10 +4521,10 @@ $response = $service->landingPages->patch($profileId, $campaignId, $id, $request echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5043,19 +4547,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Landing page campaign ID. -$campaignId = '0'; - +$campaignId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_LandingPage(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->landingPages->update($profileId, $campaignId, $requestBody); @@ -5063,10 +4562,10 @@ $response = $service->landingPages->update($profileId, $campaignId, $requestBody echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5089,12 +4588,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listLanguages` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->languages->listLanguages($profileId); @@ -5102,10 +4597,10 @@ $response = $service->languages->listLanguages($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listLanguages` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5128,12 +4623,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listMetros` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->metros->listMetros($profileId); @@ -5141,10 +4632,10 @@ $response = $service->metros->listMetros($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listMetros` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5167,15 +4658,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Mobile carrier ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->mobileCarriers->get($profileId, $id); @@ -5183,10 +4670,10 @@ $response = $service->mobileCarriers->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5209,12 +4696,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listMobileCarriers` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->mobileCarriers->listMobileCarriers($profileId); @@ -5222,10 +4705,10 @@ $response = $service->mobileCarriers->listMobileCarriers($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listMobileCarriers` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5248,15 +4731,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Operating system version ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->operatingSystemVersions->get($profileId, $id); @@ -5264,10 +4743,10 @@ $response = $service->operatingSystemVersions->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5290,12 +4769,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listOperatingSystemVersions` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->operatingSystemVersions->listOperatingSystemVersions($profileId); @@ -5303,10 +4778,10 @@ $response = $service->operatingSystemVersions->listOperatingSystemVersions($prof echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listOperatingSystemVersions` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5329,15 +4804,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Operating system DART ID. -$dartId = '0'; - +$dartId = '0'; // TODO: Update placeholder value. $response = $service->operatingSystems->get($profileId, $dartId); @@ -5345,10 +4816,10 @@ $response = $service->operatingSystems->get($profileId, $dartId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5371,12 +4842,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listOperatingSystems` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->operatingSystems->listOperatingSystems($profileId); @@ -5384,10 +4851,10 @@ $response = $service->operatingSystems->listOperatingSystems($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listOperatingSystems` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5410,18 +4877,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID for order documents. -$projectId = '0'; +$projectId = '0'; // TODO: Update placeholder value. // Order document ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->orderDocuments->get($profileId, $projectId, $id); @@ -5429,10 +4892,10 @@ $response = $service->orderDocuments->get($profileId, $projectId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5455,33 +4918,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listOrderDocuments` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID for order documents. -$projectId = '0'; - +$projectId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->orderDocuments->listOrderDocuments($profileId, $projectId, $optParams); - foreach ($response['orderDocuments'] as $order_document) { - // TODO: Change code below to process each `order_document` resource: - echo '
', var_export($order_document, true), '
', "\n"; + foreach ($response['orderDocuments'] as $orderDocument) { + // TODO: Change code below to process each `orderDocument` resource: + echo '
', var_export($orderDocument, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listOrderDocuments` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5502,20 +4961,16 @@ require_once __DIR__ . '/vendor/autoload.php'; $client = getClient(); -$service = new Google_Service_Dfareporting($client); - - -// TODO: Change placeholders below to desired parameter values for the `get` method: +$service = new Google_Service_Dfareporting($client); // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID for orders. -$projectId = '0'; +$projectId = '0'; // TODO: Update placeholder value. // Order ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->orders->get($profileId, $projectId, $id); @@ -5523,10 +4978,10 @@ $response = $service->orders->get($profileId, $projectId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5549,17 +5004,13 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listOrders` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID for orders. -$projectId = '0'; +$projectId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->orders->listOrders($profileId, $projectId, $optParams); @@ -5572,10 +5023,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listOrders` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5598,15 +5049,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->placementGroups->get($profileId, $id); @@ -5614,10 +5061,10 @@ $response = $service->placementGroups->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5640,16 +5087,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_PlacementGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->placementGroups->insert($profileId, $requestBody); @@ -5657,10 +5099,10 @@ $response = $service->placementGroups->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5683,30 +5125,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listPlacementGroups` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->placementGroups->listPlacementGroups($profileId, $optParams); - foreach ($response['placementGroups'] as $placement_group) { - // TODO: Change code below to process each `placement_group` resource: - echo '
', var_export($placement_group, true), '
', "\n"; + foreach ($response['placementGroups'] as $placementGroup) { + // TODO: Change code below to process each `placementGroup` resource: + echo '
', var_export($placementGroup, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listPlacementGroups` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5729,19 +5167,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_PlacementGroup(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->placementGroups->patch($profileId, $id, $requestBody); @@ -5749,10 +5183,10 @@ $response = $service->placementGroups->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5775,16 +5209,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_PlacementGroup(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->placementGroups->update($profileId, $requestBody); @@ -5792,10 +5221,10 @@ $response = $service->placementGroups->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5818,23 +5247,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement strategy ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->placementStrategies->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5857,15 +5282,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement strategy ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->placementStrategies->get($profileId, $id); @@ -5873,10 +5294,10 @@ $response = $service->placementStrategies->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5899,16 +5320,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_PlacementStrategy(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->placementStrategies->insert($profileId, $requestBody); @@ -5916,10 +5332,10 @@ $response = $service->placementStrategies->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5942,30 +5358,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listPlacementStrategies` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->placementStrategies->listPlacementStrategies($profileId, $optParams); - foreach ($response['placementStrategies'] as $placement_strategy) { - // TODO: Change code below to process each `placement_strategy` resource: - echo '
', var_export($placement_strategy, true), '
', "\n"; + foreach ($response['placementStrategies'] as $placementStrategy) { + // TODO: Change code below to process each `placementStrategy` resource: + echo '
', var_export($placementStrategy, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listPlacementStrategies` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -5988,19 +5400,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement strategy ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_PlacementStrategy(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->placementStrategies->patch($profileId, $id, $requestBody); @@ -6008,10 +5416,10 @@ $response = $service->placementStrategies->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6034,16 +5442,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_PlacementStrategy(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->placementStrategies->update($profileId, $requestBody); @@ -6051,10 +5454,10 @@ $response = $service->placementStrategies->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6077,12 +5480,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `generatetags` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->placements->generatetags($profileId); @@ -6090,10 +5489,10 @@ $response = $service->placements->generatetags($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `generatetags` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6116,15 +5515,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->placements->get($profileId, $id); @@ -6132,10 +5527,10 @@ $response = $service->placements->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6158,16 +5553,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Placement(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->placements->insert($profileId, $requestBody); @@ -6175,10 +5565,10 @@ $response = $service->placements->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6201,14 +5591,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listPlacements` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->placements->listPlacements($profileId, $optParams); @@ -6221,10 +5607,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listPlacements` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6247,19 +5633,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Placement ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Placement(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->placements->patch($profileId, $id, $requestBody); @@ -6267,10 +5649,10 @@ $response = $service->placements->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6293,16 +5675,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Placement(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->placements->update($profileId, $requestBody); @@ -6310,10 +5687,10 @@ $response = $service->placements->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6336,15 +5713,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Platform type ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->platformTypes->get($profileId, $id); @@ -6352,10 +5725,10 @@ $response = $service->platformTypes->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6378,12 +5751,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listPlatformTypes` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->platformTypes->listPlatformTypes($profileId); @@ -6391,10 +5760,10 @@ $response = $service->platformTypes->listPlatformTypes($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listPlatformTypes` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6417,15 +5786,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Postal code ID. -$code = '{MY-CODE}'; - +$code = ''; // TODO: Update placeholder value. $response = $service->postalCodes->get($profileId, $code); @@ -6433,10 +5798,10 @@ $response = $service->postalCodes->get($profileId, $code); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6459,12 +5824,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listPostalCodes` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->postalCodes->listPostalCodes($profileId); @@ -6472,10 +5833,10 @@ $response = $service->postalCodes->listPostalCodes($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listPostalCodes` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6498,15 +5859,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Project ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->projects->get($profileId, $id); @@ -6514,10 +5871,10 @@ $response = $service->projects->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6540,14 +5897,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjects` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->projects->listProjects($profileId, $optParams); @@ -6560,10 +5913,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listProjects` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6586,12 +5939,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listRegions` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->regions->listRegions($profileId); @@ -6599,10 +5948,10 @@ $response = $service->regions->listRegions($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listRegions` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6625,15 +5974,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Remarketing list ID. -$remarketingListId = '0'; - +$remarketingListId = '0'; // TODO: Update placeholder value. $response = $service->remarketingListShares->get($profileId, $remarketingListId); @@ -6641,10 +5986,10 @@ $response = $service->remarketingListShares->get($profileId, $remarketingListId) echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6667,19 +6012,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Remarketing list ID. -$remarketingListId = '0'; - +$remarketingListId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_RemarketingListShare(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->remarketingListShares->patch($profileId, $remarketingListId, $requestBody); @@ -6687,10 +6028,10 @@ $response = $service->remarketingListShares->patch($profileId, $remarketingListI echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6713,16 +6054,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_RemarketingListShare(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->remarketingListShares->update($profileId, $requestBody); @@ -6730,10 +6066,10 @@ $response = $service->remarketingListShares->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6756,15 +6092,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Remarketing list ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->remarketingLists->get($profileId, $id); @@ -6772,10 +6104,10 @@ $response = $service->remarketingLists->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6798,16 +6130,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_RemarketingList(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->remarketingLists->insert($profileId, $requestBody); @@ -6815,10 +6142,10 @@ $response = $service->remarketingLists->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6841,33 +6168,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listRemarketingLists` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Select only remarketing lists owned by this advertiser. -$advertiserId = '0'; +$advertiserId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->remarketingLists->listRemarketingLists($profileId, $advertiserId, $optParams); - foreach ($response['remarketingLists'] as $remarketing_list) { - // TODO: Change code below to process each `remarketing_list` resource: - echo '
', var_export($remarketing_list, true), '
', "\n"; + foreach ($response['remarketingLists'] as $remarketingList) { + // TODO: Change code below to process each `remarketingList` resource: + echo '
', var_export($remarketingList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listRemarketingLists` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6890,19 +6213,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Remarketing list ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_RemarketingList(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->remarketingLists->patch($profileId, $id, $requestBody); @@ -6910,10 +6229,10 @@ $response = $service->remarketingLists->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6936,16 +6255,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_RemarketingList(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->remarketingLists->update($profileId, $requestBody); @@ -6953,10 +6267,10 @@ $response = $service->remarketingLists->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -6979,16 +6293,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `query` method: - // The DFA user profile ID. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Report(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->reports_compatibleFields->query($profileId, $requestBody); @@ -6996,10 +6305,10 @@ $response = $service->reports_compatibleFields->query($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7022,23 +6331,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // The DFA user profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the report. -$reportId = '0'; - +$reportId = '0'; // TODO: Update placeholder value. $service->reports->delete($profileId, $reportId); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7061,20 +6366,16 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The DFA profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the report. -$reportId = '0'; +$reportId = '0'; // TODO: Update placeholder value. // The ID of the report file. -$fileId = '0'; +$fileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; // TODO: To download media content, use: // @@ -7086,10 +6387,10 @@ $response = $service->reports_files->get($profileId, $reportId, $fileId, $optPar echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7112,17 +6413,13 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listReportsFiles` method: - // The DFA profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the parent report. -$reportId = '0'; - +$reportId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->reports_files->listReportsFiles($profileId, $reportId, $optParams); @@ -7135,10 +6432,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listReportsFiles` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7161,15 +6458,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // The DFA user profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the report. -$reportId = '0'; - +$reportId = '0'; // TODO: Update placeholder value. $response = $service->reports->get($profileId, $reportId); @@ -7177,10 +6470,10 @@ $response = $service->reports->get($profileId, $reportId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7203,16 +6496,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // The DFA user profile ID. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Report(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->reports->insert($profileId, $requestBody); @@ -7220,10 +6508,10 @@ $response = $service->reports->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7246,14 +6534,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listReports` method: - // The DFA user profile ID. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->reports->listReports($profileId, $optParams); @@ -7266,10 +6550,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listReports` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7292,19 +6576,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // The DFA user profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the report. -$reportId = '0'; - +$reportId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Report(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->reports->patch($profileId, $reportId, $requestBody); @@ -7312,10 +6592,10 @@ $response = $service->reports->patch($profileId, $reportId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7338,15 +6618,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `run` method: - // The DFA profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the report. -$reportId = '0'; - +$reportId = '0'; // TODO: Update placeholder value. $response = $service->reports->run($profileId, $reportId); @@ -7354,10 +6630,10 @@ $response = $service->reports->run($profileId, $reportId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7380,19 +6656,14 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `update` method: - // The DFA user profile ID. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // The ID of the report. -$reportId = '0'; - +$reportId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Report(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->reports->update($profileId, $reportId, $requestBody); @@ -7400,10 +6671,10 @@ $response = $service->reports->update($profileId, $reportId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfareporting return null; } @@ -7426,15 +6697,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Site ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->sites->get($profileId, $id); @@ -7442,10 +6709,10 @@ $response = $service->sites->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7468,16 +6735,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Site(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->sites->insert($profileId, $requestBody); @@ -7485,10 +6747,10 @@ $response = $service->sites->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7511,14 +6773,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listSites` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->sites->listSites($profileId, $optParams); @@ -7531,10 +6789,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listSites` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7557,19 +6815,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Site ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Site(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->sites->patch($profileId, $id, $requestBody); @@ -7577,10 +6831,10 @@ $response = $service->sites->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7603,16 +6857,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Site(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->sites->update($profileId, $requestBody); @@ -7620,10 +6869,10 @@ $response = $service->sites->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7646,15 +6895,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Size ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->sizes->get($profileId, $id); @@ -7662,10 +6907,10 @@ $response = $service->sizes->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7688,16 +6933,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Size(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->sizes->insert($profileId, $requestBody); @@ -7705,10 +6945,10 @@ $response = $service->sizes->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7731,12 +6971,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listSizes` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->sizes->listSizes($profileId); @@ -7744,10 +6980,10 @@ $response = $service->sizes->listSizes($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listSizes` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7770,15 +7006,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Subaccount ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->subaccounts->get($profileId, $id); @@ -7786,10 +7018,10 @@ $response = $service->subaccounts->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7812,16 +7044,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Subaccount(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->subaccounts->insert($profileId, $requestBody); @@ -7829,10 +7056,10 @@ $response = $service->subaccounts->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7855,14 +7082,10 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listSubaccounts` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->subaccounts->listSubaccounts($profileId, $optParams); @@ -7875,10 +7098,10 @@ do { } while ($optParams['pageToken']); function getClient() { - // 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 `listSubaccounts` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7901,19 +7124,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Subaccount ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_Subaccount(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->subaccounts->patch($profileId, $id, $requestBody); @@ -7921,10 +7140,10 @@ $response = $service->subaccounts->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7947,16 +7166,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_Subaccount(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->subaccounts->update($profileId, $requestBody); @@ -7964,10 +7178,10 @@ $response = $service->subaccounts->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -7990,15 +7204,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Remarketing list ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->targetableRemarketingLists->get($profileId, $id); @@ -8006,10 +7216,10 @@ $response = $service->targetableRemarketingLists->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8032,33 +7242,29 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `listTargetableRemarketingLists` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Select only targetable remarketing lists targetable by these advertisers. -$advertiserId = '0'; +$advertiserId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->targetableRemarketingLists->listTargetableRemarketingLists($profileId, $advertiserId, $optParams); - foreach ($response['targetableRemarketingLists'] as $targetable_remarketing_list) { - // TODO: Change code below to process each `targetable_remarketing_list` resource: - echo '
', var_export($targetable_remarketing_list, true), '
', "\n"; + foreach ($response['targetableRemarketingLists'] as $targetableRemarketingList) { + // TODO: Change code below to process each `targetableRemarketingList` resource: + echo '
', var_export($targetableRemarketingList, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listTargetableRemarketingLists` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8081,15 +7287,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Targeting template ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->targetingTemplates->get($profileId, $id); @@ -8097,10 +7299,10 @@ $response = $service->targetingTemplates->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8123,16 +7325,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_TargetingTemplate(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetingTemplates->insert($profileId, $requestBody); @@ -8140,10 +7337,10 @@ $response = $service->targetingTemplates->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8166,30 +7363,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listTargetingTemplates` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->targetingTemplates->listTargetingTemplates($profileId, $optParams); - foreach ($response['targetingTemplates'] as $targeting_template) { - // TODO: Change code below to process each `targeting_template` resource: - echo '
', var_export($targeting_template, true), '
', "\n"; + foreach ($response['targetingTemplates'] as $targetingTemplate) { + // TODO: Change code below to process each `targetingTemplate` resource: + echo '
', var_export($targetingTemplate, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listTargetingTemplates` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8212,19 +7405,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // Targeting template ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_TargetingTemplate(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->targetingTemplates->patch($profileId, $id, $requestBody); @@ -8232,10 +7421,10 @@ $response = $service->targetingTemplates->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8258,16 +7447,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_TargetingTemplate(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->targetingTemplates->update($profileId, $requestBody); @@ -8275,10 +7459,10 @@ $response = $service->targetingTemplates->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8301,12 +7485,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The user profile ID. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->userProfiles->get($profileId); @@ -8314,10 +7494,10 @@ $response = $service->userProfiles->get($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; @@ -8341,17 +7521,16 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - $response = $service->userProfiles->listUserProfiles(); // TODO: Change code below to process the `response` object: echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listUserProfiles` 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 return null; @@ -8375,15 +7554,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User role permission group ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->userRolePermissionGroups->get($profileId, $id); @@ -8391,10 +7566,10 @@ $response = $service->userRolePermissionGroups->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8417,12 +7592,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listUserRolePermissionGroups` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->userRolePermissionGroups->listUserRolePermissionGroups($profileId); @@ -8430,10 +7601,10 @@ $response = $service->userRolePermissionGroups->listUserRolePermissionGroups($pr echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listUserRolePermissionGroups` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8456,15 +7627,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User role permission ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->userRolePermissions->get($profileId, $id); @@ -8472,10 +7639,10 @@ $response = $service->userRolePermissions->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8498,12 +7665,8 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listUserRolePermissions` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. $response = $service->userRolePermissions->listUserRolePermissions($profileId); @@ -8511,10 +7674,10 @@ $response = $service->userRolePermissions->listUserRolePermissions($profileId); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listUserRolePermissions` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8537,23 +7700,19 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User role ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $service->userRoles->delete($profileId, $id); function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8576,15 +7735,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `get` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User role ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->userRoles->get($profileId, $id); @@ -8592,10 +7747,10 @@ $response = $service->userRoles->get($profileId, $id); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8618,16 +7773,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_UserRole(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->userRoles->insert($profileId, $requestBody); @@ -8635,10 +7785,10 @@ $response = $service->userRoles->insert($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8661,30 +7811,26 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `listUserRoles` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->userRoles->listUserRoles($profileId, $optParams); - foreach ($response['userRoles'] as $user_role) { - // TODO: Change code below to process each `user_role` resource: - echo '
', var_export($user_role, true), '
', "\n"; + foreach ($response['userRoles'] as $userRole) { + // TODO: Change code below to process each `userRole` resource: + echo '
', var_export($userRole, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); } while ($optParams['pageToken']); function getClient() { - // 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 `listUserRoles` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8707,19 +7853,15 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` method: - // User profile ID associated with this request. -$profileId = '0'; +$profileId = '0'; // TODO: Update placeholder value. // User role ID. -$id = '0'; - +$id = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Dfareporting_UserRole(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->userRoles->patch($profileId, $id, $requestBody); @@ -8727,10 +7869,10 @@ $response = $service->userRoles->patch($profileId, $id, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } @@ -8753,16 +7895,11 @@ $client = getClient(); $service = new Google_Service_Dfareporting($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // User profile ID associated with this request. -$profileId = '0'; - +$profileId = '0'; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dfareporting_UserRole(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->userRoles->update($profileId, $requestBody); @@ -8770,10 +7907,10 @@ $response = $service->userRoles->update($profileId, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` method, authorize using one of the following scopes: + // Authorize using the following scope: // https://www.googleapis.com/auth/dfatrafficking return null; } diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dns.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dns.v1.json.baseline index c2ae31eb7c..7f66ce4569 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dns.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_dns.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,19 +26,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholders below to desired parameter values for the `create` 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. -$managedZone = '{MY-MANAGED-ZONE}'; - +$managedZone = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dns_Change(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->changes->create($project, $managedZone, $requestBody); @@ -55,8 +49,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -64,9 +60,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -74,18 +67,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$managedZone = '{MY-MANAGED-ZONE}'; +$managedZone = ''; // TODO: Update placeholder value. // The identifier of the requested change, from a previous ResourceRecordSetsChangeResponse. -$changeId = '{MY-CHANGE-ID}'; - +$changeId = ''; // TODO: Update placeholder value. $response = $service->changes->get($project, $managedZone, $changeId); @@ -101,8 +90,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -110,9 +101,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -120,17 +108,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholders below to desired parameter values for the `listChanges` 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. -$managedZone = '{MY-MANAGED-ZONE}'; - +$managedZone = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->changes->listChanges($project, $managedZone, $optParams); @@ -151,8 +135,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -160,9 +146,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -170,16 +153,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholder below to desired parameter value for the `create` method: - // Identifies the project addressed by this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Dns_ManagedZone(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->managedZones->create($project, $requestBody); @@ -195,8 +173,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -204,9 +184,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -214,15 +191,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$managedZone = '{MY-MANAGED-ZONE}'; - +$managedZone = ''; // TODO: Update placeholder value. $service->managedZones->delete($project, $managedZone); ?> @@ -235,8 +208,10 @@ $service->managedZones->delete($project, $managedZone); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -244,9 +219,6 @@ $service->managedZones->delete($project, $managedZone); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -254,15 +226,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$managedZone = '{MY-MANAGED-ZONE}'; - +$managedZone = ''; // TODO: Update placeholder value. $response = $service->managedZones->get($project, $managedZone); @@ -278,8 +246,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -287,9 +257,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -297,20 +264,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholder below to desired parameter value for the `listManagedZones` method: - // Identifies the project addressed by this request. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. - -$optParams = array(); +$optParams = []; do { $response = $service->managedZones->listManagedZones($project, $optParams); - foreach ($response['managedZones'] as $managed_zone) { - // TODO: Change code below to process each `managed_zone` resource: - echo '
', var_export($managed_zone, true), '
', "\n"; + foreach ($response['managedZones'] as $managedZone) { + // TODO: Change code below to process each `managedZone` resource: + echo '
', var_export($managedZone, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -325,8 +288,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -334,9 +299,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -344,12 +306,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // Identifies the project addressed by this request. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. $response = $service->projects->get($project); @@ -365,8 +323,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -374,9 +334,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-DnsSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -384,23 +341,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Dns($client); - -// TODO: Change placeholders below to desired parameter values for the `listResourceRecordSets` 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. -$managedZone = '{MY-MANAGED-ZONE}'; - +$managedZone = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->resourceRecordSets->listResourceRecordSets($project, $managedZone, $optParams); - foreach ($response['rrsets'] as $resource_record_set) { - // TODO: Change code below to process each `resource_record_set` resource: - echo '
', var_export($resource_record_set, true), '
', "\n"; + foreach ($response['rrsets'] as $resourceRecordSet) { + // TODO: Change code below to process each `resourceRecordSet` resource: + echo '
', var_export($resourceRecordSet, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_logging.v2beta1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_logging.v2beta1.json.baseline index a622ef1a03..04258205e8 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_logging.v2beta1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_logging.v2beta1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,13 +26,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // Required. The resource name of the log to delete. Example: // `"projects/my-project/logs/syslog"`. -$logName = 'billingAccounts/{MY-BILLINGACCOUNT}/logs/{MY-LOG}'; - +$logName = ''; // TODO: Update placeholder value. +// ex: 'billingAccounts/my-billingAccount/logs/my-log' $service->billingAccounts_logs->delete($logName); ?> @@ -46,8 +42,10 @@ $service->billingAccounts_logs->delete($logName); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -55,9 +53,6 @@ $service->billingAccounts_logs->delete($logName); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -65,18 +60,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Logging_ListLogEntriesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; do { $response = $service->entries->listEntries($requestBody, $optParams); - foreach ($response['entries'] as $log_entry) { - // TODO: Change code below to process each `log_entry` resource: - echo '
', var_export($log_entry, true), '
', "\n"; + foreach ($response['entries'] as $logEntry) { + // TODO: Change code below to process each `logEntry` resource: + echo '
', var_export($logEntry, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -91,8 +84,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -100,9 +95,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -110,10 +102,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Logging_WriteLogEntriesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->entries->write($requestBody); @@ -129,8 +119,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -138,9 +130,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -148,14 +137,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -$optParams = array(); +$optParams = []; do { $response = $service->monitoredResourceDescriptors->listMonitoredResourceDescriptors($optParams); - foreach ($response['resourceDescriptors'] as $monitored_resource_descriptor) { - // TODO: Change code below to process each `monitored_resource_descriptor` resource: - echo '
', var_export($monitored_resource_descriptor, true), '
', "\n"; + foreach ($response['resourceDescriptors'] as $monitoredResourceDescriptor) { + // TODO: Change code below to process each `monitoredResourceDescriptor` resource: + echo '
', var_export($monitoredResourceDescriptor, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -170,8 +158,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -179,9 +169,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -189,13 +176,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // Required. The resource name of the log to delete. Example: // `"projects/my-project/logs/syslog"`. -$logName = 'organizations/{MY-ORGANIZATION}/logs/{MY-LOG}'; - +$logName = ''; // TODO: Update placeholder value. +// ex: 'organizations/my-organization/logs/my-log' $service->organizations_logs->delete($logName); ?> @@ -208,8 +192,10 @@ $service->organizations_logs->delete($logName); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -217,9 +203,6 @@ $service->organizations_logs->delete($logName); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -227,13 +210,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // Required. The resource name of the log to delete. Example: // `"projects/my-project/logs/syslog"`. -$logName = 'projects/{MY-PROJECT}/logs/{MY-LOG}'; - +$logName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/logs/my-log' $service->projects_logs->delete($logName); ?> @@ -246,8 +226,10 @@ $service->projects_logs->delete($logName); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -255,9 +237,6 @@ $service->projects_logs->delete($logName); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -265,18 +244,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `create` 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 properties of `requestBody`: $requestBody = new Google_Service_Logging_LogMetric(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_metrics->create($parent, $requestBody); @@ -292,8 +267,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -301,9 +278,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -311,13 +285,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // The resource name of the metric to delete. // Example: `"projects/my-project-id/metrics/my-metric-id"`. -$metricName = 'projects/{MY-PROJECT}/metrics/{MY-METRIC}'; - +$metricName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/metrics/my-metric' $service->projects_metrics->delete($metricName); ?> @@ -330,8 +301,10 @@ $service->projects_metrics->delete($metricName); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -339,9 +312,6 @@ $service->projects_metrics->delete($metricName); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -349,13 +319,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The resource name of the desired metric. // Example: `"projects/my-project-id/metrics/my-metric-id"`. -$metricName = 'projects/{MY-PROJECT}/metrics/{MY-METRIC}'; - +$metricName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/metrics/my-metric' $response = $service->projects_metrics->get($metricName); @@ -371,8 +338,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -380,9 +349,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -390,21 +356,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsMetrics` 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' -$optParams = array(); +$optParams = []; do { $response = $service->projects_metrics->listProjectsMetrics($parent, $optParams); - foreach ($response['metrics'] as $log_metric) { - // TODO: Change code below to process each `log_metric` resource: - echo '
', var_export($log_metric, true), '
', "\n"; + foreach ($response['metrics'] as $logMetric) { + // TODO: Change code below to process each `logMetric` resource: + echo '
', var_export($logMetric, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -419,8 +382,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -428,9 +393,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -438,20 +400,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `update` 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. -$metricName = 'projects/{MY-PROJECT}/metrics/{MY-METRIC}'; - +$metricName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/metrics/my-metric' +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Logging_LogMetric(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_metrics->update($metricName, $requestBody); @@ -467,8 +425,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -476,9 +436,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -486,18 +443,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `create` 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 properties of `requestBody`: $requestBody = new Google_Service_Logging_LogSink(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_sinks->create($parent, $requestBody); @@ -513,8 +466,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -522,9 +477,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -532,15 +484,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` 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. -$sinkName = 'projects/{MY-PROJECT}/sinks/{MY-SINK}'; - +$sinkName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/sinks/my-sink' $service->projects_sinks->delete($sinkName); ?> @@ -553,8 +502,10 @@ $service->projects_sinks->delete($sinkName); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -562,9 +513,6 @@ $service->projects_sinks->delete($sinkName); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -572,13 +520,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // Required. The resource name of the sink to return. // Example: `"projects/my-project-id/sinks/my-sink-id"`. -$sinkName = 'projects/{MY-PROJECT}/sinks/{MY-SINK}'; - +$sinkName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/sinks/my-sink' $response = $service->projects_sinks->get($sinkName); @@ -594,8 +539,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -603,9 +550,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -613,21 +557,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsSinks` 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' -$optParams = array(); +$optParams = []; do { $response = $service->projects_sinks->listProjectsSinks($parent, $optParams); - foreach ($response['sinks'] as $log_sink) { - // TODO: Change code below to process each `log_sink` resource: - echo '
', var_export($log_sink, true), '
', "\n"; + foreach ($response['sinks'] as $logSink) { + // TODO: Change code below to process each `logSink` resource: + echo '
', var_export($logSink, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -642,8 +583,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -651,9 +594,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-LoggingSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -661,18 +601,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Logging($client); - -// TODO: Change placeholder below to desired parameter value for the `update` 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"`. -$sinkName = 'projects/{MY-PROJECT}/sinks/{MY-SINK}'; - +$sinkName = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/sinks/my-sink' +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Logging_LogSink(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_sinks->update($sinkName, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_prediction.v1.6.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_prediction.v1.6.json.baseline index 7d00f699c3..e43dcea6ba 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_prediction.v1.6.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_prediction.v1.6.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,19 +26,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholders below to desired parameter values for the `predict` method: - // The project associated with the model. -$project = '{MY-PROJECT}'; +$project = ''; // TODO: Update placeholder value. // The name of a hosted model. -$hostedModelName = '{MY-HOSTED-MODEL-NAME}'; - +$hostedModelName = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Prediction_Input(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->hostedmodels->predict($project, $hostedModelName, $requestBody); @@ -55,8 +49,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -64,9 +60,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -74,15 +67,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholders below to desired parameter values for the `analyze` 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. $response = $service->trainedmodels->analyze($project, $id); @@ -98,8 +87,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -107,9 +98,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -117,15 +105,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->trainedmodels->delete($project, $id); ?> @@ -138,8 +122,10 @@ $service->trainedmodels->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -147,9 +133,6 @@ $service->trainedmodels->delete($project, $id); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -157,15 +140,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->trainedmodels->get($project, $id); @@ -181,8 +160,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -190,9 +171,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -200,16 +178,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // The project associated with the model. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Prediction_Insert(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->trainedmodels->insert($project, $requestBody); @@ -225,8 +198,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -234,9 +209,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -244,14 +216,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholder below to desired parameter value for the `listTrainedmodels` method: - // The project associated with the model. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->trainedmodels->listTrainedmodels($project, $optParams); @@ -272,8 +240,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -281,9 +251,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -291,19 +258,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholders below to desired parameter values for the `predict` 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 properties of `requestBody`: $requestBody = new Google_Service_Prediction_Input(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->trainedmodels->predict($project, $id, $requestBody); @@ -319,8 +281,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -328,9 +292,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PredictionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -338,19 +299,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Prediction($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Prediction_Update(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->trainedmodels->update($project, $id, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_pubsub.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_pubsub.v1.json.baseline index 285aa94490..76ba908d33 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_pubsub.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_pubsub.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,13 +26,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `getIamPolicy` 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}'; - +// 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' $response = $service->projects_snapshots->getIamPolicy($resource); @@ -49,8 +45,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -58,9 +56,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -68,17 +63,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); +// 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 `setIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_SetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_snapshots->setIamPolicy($resource, $requestBody); @@ -94,8 +85,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -103,9 +96,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -113,17 +103,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `testIamPermissions` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_TestIamPermissionsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_snapshots->testIamPermissions($resource, $requestBody); @@ -139,8 +125,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -148,9 +136,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -158,16 +143,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `acknowledge` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_AcknowledgeRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->projects_subscriptions->acknowledge($subscription, $requestBody); ?> @@ -180,8 +161,10 @@ $service->projects_subscriptions->acknowledge($subscription, $requestBody); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -189,9 +172,6 @@ $service->projects_subscriptions->acknowledge($subscription, $requestBody); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -199,20 +179,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `create` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_Subscription(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_subscriptions->create($name, $requestBody); @@ -228,8 +204,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -237,9 +215,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -247,12 +222,9 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // The subscription to delete. -$subscription = 'projects/{MY-PROJECT}/subscriptions/{MY-SUBSCRIPTION}'; - +$subscription = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project/subscriptions/my-subscription' $service->projects_subscriptions->delete($subscription); ?> @@ -265,8 +237,10 @@ $service->projects_subscriptions->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -274,9 +248,6 @@ $service->projects_subscriptions->delete($subscription); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -284,12 +255,9 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `get` 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' $response = $service->projects_subscriptions->get($subscription); @@ -305,8 +273,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -314,9 +284,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -324,13 +291,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `getIamPolicy` 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}'; - +// 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' $response = $service->projects_subscriptions->getIamPolicy($resource); @@ -346,8 +310,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -355,9 +321,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -365,14 +328,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsSubscriptions` method: - // The name of the cloud project that subscriptions belong to. -$project = 'projects/{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project' -$optParams = array(); +$optParams = []; do { $response = $service->projects_subscriptions->listProjectsSubscriptions($project, $optParams); @@ -393,8 +353,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -402,9 +364,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -412,16 +371,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `modifyAckDeadline` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_ModifyAckDeadlineRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->projects_subscriptions->modifyAckDeadline($subscription, $requestBody); ?> @@ -434,8 +389,10 @@ $service->projects_subscriptions->modifyAckDeadline($subscription, $requestBody) * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -443,9 +400,6 @@ $service->projects_subscriptions->modifyAckDeadline($subscription, $requestBody) // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -453,16 +407,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `modifyPushConfig` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_ModifyPushConfigRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->projects_subscriptions->modifyPushConfig($subscription, $requestBody); ?> @@ -475,8 +425,10 @@ $service->projects_subscriptions->modifyPushConfig($subscription, $requestBody); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -484,9 +436,6 @@ $service->projects_subscriptions->modifyPushConfig($subscription, $requestBody); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -494,16 +443,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `pull` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_PullRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_subscriptions->pull($subscription, $requestBody); @@ -519,8 +464,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -528,9 +475,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -538,17 +482,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); +// 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 `setIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_SetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_subscriptions->setIamPolicy($resource, $requestBody); @@ -564,8 +504,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -573,9 +515,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -583,17 +522,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `testIamPermissions` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_TestIamPermissionsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_subscriptions->testIamPermissions($resource, $requestBody); @@ -609,8 +544,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -618,9 +555,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -628,19 +562,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `create` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_Topic(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_topics->create($name, $requestBody); @@ -656,8 +586,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -665,9 +597,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -675,12 +604,9 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` 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' $service->projects_topics->delete($topic); ?> @@ -693,8 +619,10 @@ $service->projects_topics->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -702,9 +630,6 @@ $service->projects_topics->delete($topic); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -712,12 +637,9 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `get` 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' $response = $service->projects_topics->get($topic); @@ -733,8 +655,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -742,9 +666,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -752,13 +673,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `getIamPolicy` 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}'; - +// 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' $response = $service->projects_topics->getIamPolicy($resource); @@ -774,8 +692,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -783,9 +703,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -793,14 +710,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsTopics` method: - // The name of the cloud project that topics belong to. -$project = 'projects/{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// ex: 'projects/my-project' -$optParams = array(); +$optParams = []; do { $response = $service->projects_topics->listProjectsTopics($project, $optParams); @@ -821,8 +735,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -830,9 +746,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -840,16 +753,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `publish` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_PublishRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_topics->publish($topic, $requestBody); @@ -865,8 +774,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -874,9 +785,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -884,17 +792,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); +// 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 `setIamPolicy` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_SetIamPolicyRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_topics->setIamPolicy($resource, $requestBody); @@ -910,8 +814,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -919,9 +825,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -929,14 +832,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `listProjectsTopicsSubscriptions` 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' - -$optParams = array(); +$optParams = []; do { $response = $service->projects_topics_subscriptions->listProjectsTopicsSubscriptions($topic, $optParams); @@ -957,8 +857,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -966,9 +868,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-PubsubSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -976,17 +875,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Pubsub($client); - -// TODO: Change placeholder below to desired parameter value for the `testIamPermissions` 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 properties of `requestBody`: $requestBody = new Google_Service_Pubsub_TestIamPermissionsRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->projects_topics->testIamPermissions($resource, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_replicapoolupdater.v1beta1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_replicapoolupdater.v1beta1.json.baseline index ee78a74923..a0c6179cd1 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_replicapoolupdater.v1beta1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_replicapoolupdater.v1beta1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,18 +26,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `cancel` 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. -$rollingUpdate = '{MY-ROLLING-UPDATE}'; - +$rollingUpdate = ''; // TODO: Update placeholder value. $response = $service->rollingUpdates->cancel($project, $zone, $rollingUpdate); @@ -54,8 +49,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -63,9 +60,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -73,18 +67,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$rollingUpdate = '{MY-ROLLING-UPDATE}'; - +$rollingUpdate = ''; // TODO: Update placeholder value. $response = $service->rollingUpdates->get($project, $zone, $rollingUpdate); @@ -100,8 +90,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -109,9 +101,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -119,19 +108,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Replicapoolupdater_RollingUpdate(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->rollingUpdates->insert($project, $zone, $requestBody); @@ -147,8 +131,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -156,9 +142,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -166,23 +149,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `listRollingUpdates` 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. - -$optParams = array(); +$optParams = []; do { $response = $service->rollingUpdates->listRollingUpdates($project, $zone, $optParams); - foreach ($response['items'] as $rolling_update) { - // TODO: Change code below to process each `rolling_update` resource: - echo '
', var_export($rolling_update, true), '
', "\n"; + foreach ($response['items'] as $rollingUpdate) { + // TODO: Change code below to process each `rollingUpdate` resource: + echo '
', var_export($rollingUpdate, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -197,8 +176,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -206,9 +187,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -216,26 +194,22 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `listInstanceUpdates` 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. -$rollingUpdate = '{MY-ROLLING-UPDATE}'; - +$rollingUpdate = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->rollingUpdates->listInstanceUpdates($project, $zone, $rollingUpdate, $optParams); - foreach ($response['items'] as $instance_update) { - // TODO: Change code below to process each `instance_update` resource: - echo '
', var_export($instance_update, true), '
', "\n"; + foreach ($response['items'] as $instanceUpdate) { + // TODO: Change code below to process each `instanceUpdate` resource: + echo '
', var_export($instanceUpdate, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -250,8 +224,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -259,9 +235,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -269,18 +242,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `pause` 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. -$rollingUpdate = '{MY-ROLLING-UPDATE}'; - +$rollingUpdate = ''; // TODO: Update placeholder value. $response = $service->rollingUpdates->pause($project, $zone, $rollingUpdate); @@ -296,8 +265,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -305,9 +276,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -315,18 +283,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `resume` 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. -$rollingUpdate = '{MY-ROLLING-UPDATE}'; - +$rollingUpdate = ''; // TODO: Update placeholder value. $response = $service->rollingUpdates->resume($project, $zone, $rollingUpdate); @@ -342,8 +306,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -351,9 +317,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -361,18 +324,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `rollback` 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. -$rollingUpdate = '{MY-ROLLING-UPDATE}'; - +$rollingUpdate = ''; // TODO: Update placeholder value. $response = $service->rollingUpdates->rollback($project, $zone, $rollingUpdate); @@ -388,8 +347,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -397,9 +358,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -407,18 +365,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->zoneOperations->get($project, $zone, $operation); @@ -434,8 +388,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -443,9 +399,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-ReplicapoolupdaterSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -453,17 +406,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Replicapoolupdater($client); - -// TODO: Change placeholders below to desired parameter values for the `listZoneOperations` 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. -$optParams = array(); +$optParams = []; do { $response = $service->zoneOperations->listZoneOperations($project, $zone, $optParams); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_sqladmin.v1beta4.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_sqladmin.v1beta4.json.baseline index fc373d17a1..5f107da3a6 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_sqladmin.v1beta4.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_sqladmin.v1beta4.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,18 +26,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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 = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->backupRuns->delete($project, $instance, $id); @@ -54,8 +49,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -63,9 +60,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -73,18 +67,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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 = '0'; - +$id = '0'; // TODO: Update placeholder value. $response = $service->backupRuns->get($project, $instance, $id); @@ -100,8 +90,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -109,9 +101,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -119,19 +108,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_BackupRun(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->backupRuns->insert($project, $instance, $requestBody); @@ -147,8 +131,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -156,9 +142,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -166,23 +149,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `listBackupRuns` 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. -$optParams = array(); +$optParams = []; do { $response = $service->backupRuns->listBackupRuns($project, $instance, $optParams); - foreach ($response['items'] as $backup_run) { - // TODO: Change code below to process each `backup_run` resource: - echo '
', var_export($backup_run, true), '
', "\n"; + foreach ($response['items'] as $backupRun) { + // TODO: Change code below to process each `backupRun` resource: + echo '
', var_export($backupRun, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -197,8 +176,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -206,9 +187,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -216,18 +194,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->databases->delete($project, $instance, $database); @@ -243,8 +217,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -252,9 +228,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -262,18 +235,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->databases->get($project, $instance, $database); @@ -289,8 +258,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -298,9 +269,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -308,19 +276,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_Database(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->databases->insert($project, $instance, $requestBody); @@ -336,8 +299,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -345,9 +310,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -355,15 +317,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `listDatabases` 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. $response = $service->databases->listDatabases($project, $instance); @@ -379,8 +337,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -388,9 +348,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -398,22 +355,18 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_SQLAdmin_Database(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->databases->patch($project, $instance, $database, $requestBody); @@ -429,8 +382,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -438,9 +393,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -448,22 +400,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_Database(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->databases->update($project, $instance, $database, $requestBody); @@ -479,8 +426,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -488,9 +437,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -498,7 +444,6 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - $response = $service->flags->listFlags(); // TODO: Change code below to process the `response` object: @@ -513,8 +458,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -522,9 +469,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -532,19 +476,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `cloneInstances` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_InstancesCloneRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->cloneInstances($project, $instance, $requestBody); @@ -560,8 +499,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -569,9 +510,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -579,15 +517,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->instances->delete($project, $instance); @@ -603,8 +537,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -612,9 +548,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -622,19 +555,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `export` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_InstancesExportRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->export($project, $instance, $requestBody); @@ -650,8 +578,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -659,9 +589,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -669,19 +596,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `failover` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_InstancesFailoverRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->failover($project, $instance, $requestBody); @@ -697,8 +619,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -706,9 +630,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -716,15 +637,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->instances->get($project, $instance); @@ -740,8 +657,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -749,9 +668,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -759,19 +675,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `import` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_InstancesImportRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->import($project, $instance, $requestBody); @@ -787,8 +698,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -796,9 +709,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -806,16 +716,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_DatabaseInstance(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->insert($project, $requestBody); @@ -831,8 +736,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -840,9 +747,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -850,20 +754,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholder below to desired parameter value for the `listInstances` method: - // Project ID of the project for which to list Cloud SQL instances. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->instances->listInstances($project, $optParams); - foreach ($response['items'] as $database_instance) { - // TODO: Change code below to process each `database_instance` resource: - echo '
', var_export($database_instance, true), '
', "\n"; + foreach ($response['items'] as $databaseInstance) { + // TODO: Change code below to process each `databaseInstance` resource: + echo '
', var_export($databaseInstance, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -878,8 +778,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -887,9 +789,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -897,19 +796,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_SQLAdmin_DatabaseInstance(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->instances->patch($project, $instance, $requestBody); @@ -925,8 +820,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -934,9 +831,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -944,15 +838,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `promoteReplica` 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. $response = $service->instances->promoteReplica($project, $instance); @@ -968,8 +858,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -977,9 +869,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -987,15 +876,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `resetSslConfig` 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. $response = $service->instances->resetSslConfig($project, $instance); @@ -1011,8 +896,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1020,9 +907,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1030,15 +914,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `restart` 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. $response = $service->instances->restart($project, $instance); @@ -1054,8 +934,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1063,9 +945,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1073,19 +952,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `restoreBackup` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_InstancesRestoreBackupRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->restoreBackup($project, $instance, $requestBody); @@ -1101,8 +975,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1110,9 +986,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1120,15 +993,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `startReplica` 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. $response = $service->instances->startReplica($project, $instance); @@ -1144,8 +1013,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1153,9 +1024,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1163,15 +1031,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `stopReplica` 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. $response = $service->instances->stopReplica($project, $instance); @@ -1187,8 +1051,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1196,9 +1062,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1206,19 +1069,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_DatabaseInstance(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->instances->update($project, $instance, $requestBody); @@ -1234,8 +1092,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1243,9 +1103,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1253,15 +1110,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->operations->get($project, $operation); @@ -1277,8 +1130,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1286,9 +1141,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1296,17 +1148,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `listOperations` 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. -$optParams = array(); +$optParams = []; do { $response = $service->operations->listOperations($project, $instance, $optParams); @@ -1327,8 +1175,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1336,9 +1186,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1346,19 +1193,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `createEphemeral` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_SslCertsCreateEphemeralRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->sslCerts->createEphemeral($project, $instance, $requestBody); @@ -1374,8 +1216,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1383,9 +1227,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1393,18 +1234,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. -$sha1Fingerprint = '{MY-SHA1-FINGERPRINT}'; - +$sha1Fingerprint = ''; // TODO: Update placeholder value. $response = $service->sslCerts->delete($project, $instance, $sha1Fingerprint); @@ -1420,8 +1257,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1429,9 +1268,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1439,18 +1275,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$sha1Fingerprint = '{MY-SHA1-FINGERPRINT}'; - +$sha1Fingerprint = ''; // TODO: Update placeholder value. $response = $service->sslCerts->get($project, $instance, $sha1Fingerprint); @@ -1466,8 +1298,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1475,9 +1309,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1485,19 +1316,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_SslCertsInsertRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->sslCerts->insert($project, $instance, $requestBody); @@ -1513,8 +1339,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1522,9 +1350,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1532,15 +1357,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `listSslCerts` 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. $response = $service->sslCerts->listSslCerts($project, $instance); @@ -1556,8 +1377,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1565,9 +1388,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1575,12 +1395,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholder below to desired parameter value for the `listTiers` method: - // Project ID of the project for which to list tiers. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. $response = $service->tiers->listTiers($project); @@ -1596,8 +1412,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1605,9 +1423,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1615,21 +1430,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $response = $service->users->delete($project, $instance, $host, $name); @@ -1645,8 +1456,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1654,9 +1467,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1664,19 +1474,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_User(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->users->insert($project, $instance, $requestBody); @@ -1692,8 +1497,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1701,9 +1508,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1711,15 +1515,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `listUsers` 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. $response = $service->users->listUsers($project, $instance); @@ -1735,8 +1535,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1744,9 +1546,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-SQLAdminSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1754,25 +1553,20 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_SQLAdmin($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_SQLAdmin_User(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->users->update($project, $instance, $host, $name, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storage.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storage.v1.json.baseline index c03118b969..0c8265beeb 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storage.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storage.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,16 +26,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->bucketAccessControls->delete($bucket, $entity); ?> @@ -49,8 +44,10 @@ $service->bucketAccessControls->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -58,9 +55,6 @@ $service->bucketAccessControls->delete($bucket, $entity); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -68,16 +62,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->bucketAccessControls->get($bucket, $entity); @@ -93,8 +83,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -102,9 +94,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -112,16 +101,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_BucketAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->bucketAccessControls->insert($bucket, $requestBody); @@ -137,8 +121,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -146,9 +132,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -156,12 +139,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `listBucketAccessControls` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. $response = $service->bucketAccessControls->listBucketAccessControls($bucket); @@ -177,8 +156,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -186,9 +167,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -196,20 +174,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Storage_BucketAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->bucketAccessControls->patch($bucket, $entity, $requestBody); @@ -225,8 +199,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -234,9 +210,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -244,20 +217,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Storage_BucketAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->bucketAccessControls->update($bucket, $entity, $requestBody); @@ -273,8 +241,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -282,9 +252,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -292,12 +259,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. $service->buckets->delete($bucket); ?> @@ -310,8 +273,10 @@ $service->buckets->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -319,9 +284,6 @@ $service->buckets->delete($bucket); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -329,12 +291,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. $response = $service->buckets->get($bucket); @@ -350,8 +308,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -359,9 +319,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -369,16 +326,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // A valid API project identifier. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_Bucket(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->buckets->insert($project, $requestBody); @@ -394,8 +346,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -403,9 +357,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -413,14 +364,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `listBuckets` method: - // A valid API project identifier. -$project = '{MY-PROJECT}'; - +$project = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->buckets->listBuckets($project, $optParams); @@ -441,8 +388,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -450,9 +399,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -460,16 +406,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `patch` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Storage_Bucket(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->buckets->patch($bucket, $requestBody); @@ -485,8 +427,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -494,9 +438,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -504,16 +445,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `update` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_Bucket(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->buckets->update($bucket, $requestBody); @@ -529,8 +465,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -538,9 +476,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -548,10 +483,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_Channel(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->channels->stop($requestBody); ?> @@ -564,8 +497,10 @@ $service->channels->stop($requestBody); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -573,9 +508,6 @@ $service->channels->stop($requestBody); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -583,16 +515,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->defaultObjectAccessControls->delete($bucket, $entity); ?> @@ -605,8 +533,10 @@ $service->defaultObjectAccessControls->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -614,9 +544,6 @@ $service->defaultObjectAccessControls->delete($bucket, $entity); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -624,16 +551,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->defaultObjectAccessControls->get($bucket, $entity); @@ -649,8 +572,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -658,9 +583,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -668,16 +590,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `insert` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_ObjectAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->defaultObjectAccessControls->insert($bucket, $requestBody); @@ -693,8 +610,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -702,9 +621,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -712,12 +628,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `listDefaultObjectAccessControls` method: - // Name of a bucket. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. $response = $service->defaultObjectAccessControls->listDefaultObjectAccessControls($bucket); @@ -733,8 +645,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -742,9 +656,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -752,20 +663,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Storage_ObjectAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->defaultObjectAccessControls->patch($bucket, $entity, $requestBody); @@ -781,8 +688,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -790,9 +699,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -800,20 +706,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Storage_ObjectAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->defaultObjectAccessControls->update($bucket, $entity, $requestBody); @@ -829,8 +730,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -838,9 +741,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -848,20 +748,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->objectAccessControls->delete($bucket, $object, $entity); ?> @@ -874,8 +770,10 @@ $service->objectAccessControls->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -883,9 +781,6 @@ $service->objectAccessControls->delete($bucket, $object, $entity); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -893,20 +788,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->objectAccessControls->get($bucket, $object, $entity); @@ -922,8 +813,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -931,9 +824,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -941,20 +831,15 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Storage_ObjectAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->objectAccessControls->insert($bucket, $object, $requestBody); @@ -970,8 +855,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -979,9 +866,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -989,16 +873,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `listObjectAccessControls` 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. $response = $service->objectAccessControls->listObjectAccessControls($bucket, $object); @@ -1014,8 +894,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1023,9 +905,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1033,24 +912,20 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Storage_ObjectAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->objectAccessControls->patch($bucket, $object, $entity, $requestBody); @@ -1066,8 +941,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1075,9 +952,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1085,24 +959,19 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Storage_ObjectAccessControl(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->objectAccessControls->update($bucket, $object, $entity, $requestBody); @@ -1118,8 +987,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1127,9 +998,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1137,22 +1005,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `compose` method: - // Name of the bucket in which to store the new object. -$destinationBucket = '{MY-DESTINATION-BUCKET}'; +$destinationBucket = ''; // 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. -$destinationObject = '{MY-DESTINATION-OBJECT}'; - +$destinationObject = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_ComposeRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; // TODO: To download media content, use: // @@ -1172,8 +1035,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1181,9 +1046,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1191,31 +1053,26 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `copy` method: - // Name of the bucket in which to find the source object. -$sourceBucket = '{MY-SOURCE-BUCKET}'; +$sourceBucket = ''; // 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. -$sourceObject = '{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. +$sourceObject = ''; // 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. -$destinationBucket = '{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. +$destinationBucket = ''; // 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. -$destinationObject = '{MY-DESTINATION-OBJECT}'; - +$destinationObject = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_StorageObject(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; // TODO: To download media content, use: // @@ -1235,8 +1092,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1244,9 +1103,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1254,16 +1110,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->objects->delete($bucket, $object); ?> @@ -1276,8 +1128,10 @@ $service->objects->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1285,9 +1139,6 @@ $service->objects->delete($bucket, $object); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1295,18 +1146,14 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. -$optParams = array(); +$optParams = []; // TODO: To download media content, use: // @@ -1326,8 +1173,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1335,9 +1184,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1345,22 +1191,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); +// 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` 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 properties of `requestBody`: $requestBody = new Google_Service_Storage_StorageObject(); -// TODO: Assign values to desired properties of the `requestBody` object. - // TODO: Add desired media content for upload. For more information, see: // https://developers.google.com/api-client-library/php/guide/media_upload - $response = $service->objects->insert($bucket, $requestBody); // TODO: Change code below to process the `response` object: @@ -1375,8 +1215,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1384,9 +1226,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1394,20 +1233,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `listObjects` method: - // Name of the bucket in which to look for objects. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->objects->listObjects($bucket, $optParams); - foreach ($response['items'] as $object) { - // TODO: Change code below to process each `object` resource: - echo '
', var_export($object, true), '
', "\n"; + foreach ($response['items'] as $storageObject) { + // TODO: Change code below to process each `storageObject` resource: + echo '
', var_export($storageObject, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -1422,8 +1257,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1431,9 +1268,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1441,20 +1275,16 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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 properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Storage_StorageObject(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->objects->patch($bucket, $object, $requestBody); @@ -1470,8 +1300,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1479,9 +1311,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1489,29 +1318,24 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `rewrite` method: - // Name of the bucket in which to find the source object. -$sourceBucket = '{MY-SOURCE-BUCKET}'; +$sourceBucket = ''; // 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. -$sourceObject = '{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. +$sourceObject = ''; // 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. -$destinationBucket = '{MY-DESTINATION-BUCKET}'; +// Name of the bucket in which to store the new object. Overrides the provided object metadata's +// bucket value, if any. +$destinationBucket = ''; // 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. -$destinationObject = '{MY-DESTINATION-OBJECT}'; - +$destinationObject = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_StorageObject(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->objects->rewrite($sourceBucket, $sourceObject, $destinationBucket, $destinationObject, $requestBody); @@ -1527,8 +1351,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1536,9 +1362,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1546,22 +1369,17 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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 properties of `requestBody`: $requestBody = new Google_Service_Storage_StorageObject(); -// TODO: Assign values to desired properties of the `requestBody` object. - -$optParams = array(); +$optParams = []; // TODO: To download media content, use: // @@ -1581,8 +1399,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -1590,9 +1410,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StorageSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -1600,16 +1417,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storage($client); - -// TODO: Change placeholder below to desired parameter value for the `watchAll` method: - // Name of the bucket in which to look for objects. -$bucket = '{MY-BUCKET}'; - +$bucket = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storage_Channel(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->objects->watchAll($bucket, $requestBody); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storagetransfer.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storagetransfer.v1.json.baseline index 84829efcf7..4ed1fa7230 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storagetransfer.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_storagetransfer.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,7 +26,6 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - $response = $service->v1->getGoogleServiceAccount(); // TODO: Change code below to process the `response` object: @@ -42,8 +40,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -51,9 +51,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -61,13 +58,9 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The ID of the Google Developers Console project that the Google service account is associated with. // Required. -$projectId = '{MY-PROJECT-ID}'; - +$projectId = ''; // TODO: Update placeholder value. $response = $service->googleServiceAccounts->get($projectId); @@ -83,8 +76,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -92,9 +87,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -102,10 +94,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storagetransfer_TransferJob(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->transferJobs->create($requestBody); @@ -121,8 +111,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -130,9 +122,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -140,12 +129,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The job to get. Required. -$jobName = '{MY-JOB-NAME}'; - +$jobName = ''; // TODO: Update placeholder value. $response = $service->transferJobs->get($jobName); @@ -161,8 +146,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -170,9 +157,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -180,14 +164,13 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -$optParams = array(); +$optParams = []; do { $response = $service->transferJobs->listTransferJobs($optParams); - foreach ($response['transferJobs'] as $transfer_job) { - // TODO: Change code below to process each `transfer_job` resource: - echo '
', var_export($transfer_job, true), '
', "\n"; + foreach ($response['transferJobs'] as $transferJob) { + // TODO: Change code below to process each `transferJob` resource: + echo '
', var_export($transferJob, true), '
', "\n"; } $optParams['pageToken'] = $response->getNextPageToken(); @@ -202,8 +185,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -211,9 +196,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -221,16 +203,12 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `patch` method: - // The name of job to update. Required. -$jobName = '{MY-JOB-NAME}'; - +$jobName = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Storagetransfer_UpdateTransferJobRequest(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->transferJobs->patch($jobName, $requestBody); @@ -246,8 +224,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -255,9 +235,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -265,12 +242,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `cancel` method: - // The name of the operation resource to be cancelled. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. $service->transferOperations->cancel($name); ?> @@ -283,8 +256,10 @@ $service->transferOperations->cancel($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -292,9 +267,6 @@ $service->transferOperations->cancel($name); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -302,12 +274,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `delete` method: - // The name of the operation resource to be deleted. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. $service->transferOperations->delete($name); ?> @@ -320,8 +288,10 @@ $service->transferOperations->delete($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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -329,9 +299,6 @@ $service->transferOperations->delete($name); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -339,12 +306,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `get` method: - // The name of the operation resource. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. $response = $service->transferOperations->get($name); @@ -360,8 +323,10 @@ echo '
', var_export($response, true), '
', "\n"; * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -369,9 +334,6 @@ echo '
', var_export($response, true), '
', "\n"; // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -379,14 +341,10 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `listTransferOperations` method: - // The value `transferOperations`. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. -$optParams = array(); +$optParams = []; do { $response = $service->transferOperations->listTransferOperations($name, $optParams); @@ -407,8 +365,10 @@ do { * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -416,9 +376,6 @@ do { // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -426,16 +383,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `pause` method: - // The name of the transfer operation. Required. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storagetransfer_PauseTransferOperationRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->transferOperations->pause($name, $requestBody); ?> @@ -448,8 +400,10 @@ $service->transferOperations->pause($name, $requestBody); * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -457,9 +411,6 @@ $service->transferOperations->pause($name, $requestBody); // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-StoragetransferSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -467,16 +418,11 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Storagetransfer($client); - -// TODO: Change placeholder below to desired parameter value for the `resume` method: - // The name of the transfer operation. Required. -$name = '{MY-NAME}'; - +$name = ''; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Storagetransfer_ResumeTransferOperationRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $service->transferOperations->resume($name, $requestBody); ?> diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_taskqueue.v1beta2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_taskqueue.v1beta2.json.baseline index 360cf703e9..f6078893a1 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_taskqueue.v1beta2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_taskqueue.v1beta2.json.baseline @@ -17,15 +17,11 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->taskqueues->get($project, $taskqueue); @@ -33,10 +29,10 @@ $response = $service->taskqueues->get($project, $taskqueue); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; @@ -60,26 +56,22 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `delete` 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. $service->tasks->delete($project, $taskqueue, $task); function getClient() { - // 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` 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 return null; @@ -103,18 +95,14 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `get` 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. $response = $service->tasks->get($project, $taskqueue, $task); @@ -122,10 +110,10 @@ $response = $service->tasks->get($project, $taskqueue, $task); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; @@ -149,19 +137,14 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `insert` 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 properties of `requestBody`: $requestBody = new Google_Service_Taskqueue_Task(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->tasks->insert($project, $taskqueue, $requestBody); @@ -169,10 +152,10 @@ $response = $service->tasks->insert($project, $taskqueue, $requestBody); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; @@ -196,21 +179,17 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `lease` 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. -$numTasks = 0; +$numTasks = 0; // TODO: Update placeholder value. // The lease in seconds. -$leaseSecs = 0; - +$leaseSecs = 0; // TODO: Update placeholder value. $response = $service->tasks->lease($project, $taskqueue, $numTasks, $leaseSecs); @@ -218,10 +197,10 @@ $response = $service->tasks->lease($project, $taskqueue, $numTasks, $leaseSecs); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; @@ -245,15 +224,11 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `listTasks` 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. $response = $service->tasks->listTasks($project, $taskqueue); @@ -261,10 +236,10 @@ $response = $service->tasks->listTasks($project, $taskqueue); echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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 `listTasks` 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 return null; @@ -288,25 +263,19 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `patch` 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. -$newLeaseSeconds = 0; - +$newLeaseSeconds = 0; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`. Only assigned +// properties will be changed: $requestBody = new Google_Service_Taskqueue_Task(); -// TODO: Assign values to desired properties of the `requestBody` object to be changed. - $response = $service->tasks->patch($project, $taskqueue, $task, $newLeaseSeconds, $requestBody); @@ -314,10 +283,10 @@ $response = $service->tasks->patch($project, $taskqueue, $task, $newLeaseSeconds echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; @@ -341,25 +310,18 @@ $client = getClient(); $service = new Google_Service_Taskqueue($client); - -// TODO: Change placeholders below to desired parameter values for the `update` 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. -$newLeaseSeconds = 0; - +$newLeaseSeconds = 0; // TODO: Update placeholder value. +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Taskqueue_Task(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->tasks->update($project, $taskqueue, $task, $newLeaseSeconds, $requestBody); @@ -367,10 +329,10 @@ $response = $service->tasks->update($project, $taskqueue, $task, $newLeaseSecond echo '
', var_export($response, true), '
', "\n"; function getClient() { - // 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` 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 return null; diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_translate.v2.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_translate.v2.json.baseline index 890c4264a4..cef7d51fba 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_translate.v2.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_translate.v2.json.baseline @@ -15,18 +15,12 @@ require_once __DIR__ . '/vendor/autoload.php'; $client = new Google_Client(); $client->setApplicationName('Google-TranslateSample/0.1'); - -// TODO: Change placeholder below to desired API key: -$client->setDeveloperKey('{MY-API-KEY}'); +$client->setDeveloperKey(''); // TODO: Update placeholder with desired API key. $service = new Google_Service_Translate($client); - -// TODO: Change placeholder below to desired parameter value for the `listDetections` method: - // The text to detect -$q = []; - +$q = []; // TODO: Update placeholder value. $response = $service->detections->listDetections($q); @@ -49,13 +43,10 @@ require_once __DIR__ . '/vendor/autoload.php'; $client = new Google_Client(); $client->setApplicationName('Google-TranslateSample/0.1'); - -// TODO: Change placeholder below to desired API key: -$client->setDeveloperKey('{MY-API-KEY}'); +$client->setDeveloperKey(''); // TODO: Update placeholder with desired API key. $service = new Google_Service_Translate($client); - $response = $service->languages->listLanguages(); // TODO: Change code below to process the `response` object: @@ -77,21 +68,15 @@ require_once __DIR__ . '/vendor/autoload.php'; $client = new Google_Client(); $client->setApplicationName('Google-TranslateSample/0.1'); - -// TODO: Change placeholder below to desired API key: -$client->setDeveloperKey('{MY-API-KEY}'); +$client->setDeveloperKey(''); // TODO: Update placeholder with desired API key. $service = new Google_Service_Translate($client); - -// TODO: Change placeholders below to desired parameter values for the `listTranslations` method: - // 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. $response = $service->translations->listTranslations($q, $target); diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_vision.v1.json.baseline b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_vision.v1.json.baseline index 86d292d114..e4e4f11504 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_vision.v1.json.baseline +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/php/php_vision.v1.json.baseline @@ -8,8 +8,10 @@ * 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 PHP client library with Composer. Check installation * instructions at https://github.com/google/google-api-php-client. */ @@ -17,9 +19,6 @@ // Autoload Composer. require_once __DIR__ . '/vendor/autoload.php'; -// Use Application Default Credentials for authentication when running locally. -// For more information, see: -// https://developers.google.com/identity/protocols/application-default-credentials $client = new Google_Client(); $client->setApplicationName('Google-VisionSample/0.1'); $client->useApplicationDefaultCredentials(); @@ -27,10 +26,8 @@ $client->addScope('https://www.googleapis.com/auth/cloud-platform'); $service = new Google_Service_Vision($client); - +// TODO: Assign values to desired properties of `requestBody`: $requestBody = new Google_Service_Vision_BatchAnnotateImagesRequest(); -// TODO: Assign values to desired properties of the `requestBody` object. - $response = $service->images->annotate($requestBody); 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 70a45eb990..695e012383 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 @@ -1361,14 +1361,10 @@ project = '' # TODO: Update placeholder value. # Database instance ID. This does not include the project ID. instance = '' # TODO: Update placeholder value. -items = service.fetch_all(items: :items) do |token| - service.list_users(project, instance, page_token: token) -end +response = service.list_users(project, instance) -items.each do |user| - # TODO: Change code below to process each `user` resource: - puts JSON.pretty_generate(user) -end +# TODO: Change code below to process the `response` object: +puts JSON.pretty_generate(response) # BEFORE RUNNING: # --------------- # 1. If not already done, enable the Cloud SQL Administration API 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 7bb1352870..5afae5c005 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 @@ -25,6 +25,18 @@ } }, "ruby": { - "apiTypeName": "SQLAdminService" + "apiTypeName": "SQLAdminService", + "methods": { + "sql.users.list": { + "isPageStreaming": false + } + } + }, + "php": { + "methods": { + "sql.users.list": { + "isPageStreaming": false + } + } } } diff --git a/src/test/java/com/google/api/codegen/testdata/discoveries/storage.v1.json.overrides b/src/test/java/com/google/api/codegen/testdata/discoveries/storage.v1.json.overrides index 5ad79e3cdf..837473b101 100644 --- a/src/test/java/com/google/api/codegen/testdata/discoveries/storage.v1.json.overrides +++ b/src/test/java/com/google/api/codegen/testdata/discoveries/storage.v1.json.overrides @@ -80,5 +80,87 @@ } } } + }, + "php": { + "methods": { + "storage.objects.patch": { + "requestBodyType": { + "message": { + "typeName": "StorageObject" + } + }, + "responseType": { + "message": { + "typeName": "StorageObject" + } + } + }, + "storage.objects.get": { + "responseType": { + "message": { + "typeName": "StorageObject" + } + } + }, + "storage.objects.insert": { + "requestBodyType": { + "message": { + "typeName": "StorageObject" + } + }, + "responseType": { + "message": { + "typeName": "StorageObject" + } + } + }, + "storage.objects.list": { + "pageStreamingResourceField": { + "type": { + "message": { + "typeName": "StorageObject" + } + } + } + }, + "storage.objects.rewrite": { + "requestBodyType": { + "message": { + "typeName": "StorageObject" + } + } + }, + "storage.objects.update": { + "requestBodyType": { + "message": { + "typeName": "StorageObject" + } + }, + "responseType": { + "message": { + "typeName": "StorageObject" + } + } + }, + "storage.objects.compose": { + "responseType": { + "message": { + "typeName": "StorageObject" + } + } + }, + "storage.objects.copy": { + "requestBodyType": { + "message": { + "typeName": "StorageObject" + } + }, + "responseType": { + "message": { + "typeName": "StorageObject" + } + } + } + } } } 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 2d99c24d9a..a72af9210d 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 @@ -10,26 +10,20 @@ "packagePrefix": "com.google.api.services.storagetransfer.v1", "methods": { "storagetransfer.getGoogleServiceAccount": { - "nameComponents": ["googleServiceAccounts", "get"], - "fields": { - "projectId": { - "name": "projectId", - "type": { - "kind": "TYPE_STRING", - "isMap": false, - "isArray": false, - "isMessage": false - }, - "example": "", - "description": "The ID of the Google Developers Console project that the Google service account is associated with. Required." - } - }, + "nameComponents": ["v1", "getGoogleServiceAccount"], "requestType": { "message": { - "typeName": "GoogleServiceAccounts.Get" + "typeName": "V1.GetGoogleServiceAccount" } } } } + }, + "php": { + "methods": { + "storagetransfer.getGoogleServiceAccount": { + "nameComponents": ["v1", "getGoogleServiceAccount"] + } + } } }