-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
533 changed files
with
533 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"metadata":{"apiName":"appengine","apiVersion":"v1beta4","fragmentGenerationVersion":"0.1","generatedOn":"1-21-2016"},"code_fragment":{"java":"// Autogenerated example code for appengine.apps.get\r\n\r\n// PRE-REQUISITES:\r\n// ---------------\r\n// 1. If not already done, enable appengine Api and check quota for your project at\r\n// https://console.developers.google.com/apis/api/appengine/quotas \r\n// 2. To install the client library on maven or gradle, check installation instructions at \r\n// https://github.com/google/google-api-java-client. \r\n// On other build systems, you can add the jar files to your project from \r\n// https://developers.google.com/resources/api-libraries/download/appengine/v1beta4/java\r\n// 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n// https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\nimport com.google.api.client.googleapis.auth.oauth2.GoogleCredential;\r\nimport com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;\r\nimport com.google.api.client.http.HttpTransport;\r\nimport com.google.api.client.json.JsonFactory;\r\nimport com.google.api.client.json.jackson2.JacksonFactory;\r\nimport com.google.api.services.appengine.Appengine;\r\nimport com.google.api.services.appengine.model.*;\r\n\r\nimport java.io.IOException;\r\nimport java.security.GeneralSecurityException;\r\nimport java.util.Collections;\r\n\r\npublic class AppengineSample {\r\n\tpublic static void main(String[] args) throws IOException, GeneralSecurityException {\r\n\t\t// Authentication is provided by gcloud tool when running locally\r\n\t\t// and by built-in service accounts when running on GAE, GCE or GKE.\r\n\t\tGoogleCredential credential = GoogleCredential.getApplicationDefault();\r\n\t\t\t \r\n\t\t// The createScopedRequired method returns true when running on GAE or a local developer\r\n\t\t// machine. In that case, the desired scopes must be passed in manually. When the code is\r\n\t\t// running in GCE, GKE or a Managed VM, the scopes are pulled from the GCE metadata server.\r\n\t\t// See https://developers.google.com/identity/protocols/application-default-credentials for more information.\r\n\t\tif (credential.createScopedRequired()) {\r\n\t\t\tcredential = credential.createScoped(Collections.singletonList(\"https://www.googleapis.com/auth/cloud-platform\"));\r\n\t\t}\r\n\t\t\t\t\r\n\t\tHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\r\n\t\tJsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); \r\n\t\tAppengine appengineService = new Appengine.Builder(httpTransport, jsonFactory, credential)\r\n\t\t\t.setApplicationName(\"Google Cloud Platform Sample\")\r\n\t\t\t.build();\r\n\r\n\t\tAppengine.Apps.Get request = appengineService.apps().get(\"example-appsId\");\r\n\t\tApplication response = request.execute();\r\n\t}\r\n}","python":"# Autogenerated example code for appengine.apps.get\r\n\r\n# PRE-REQUISITES:\r\n# ---------------\r\n# 1. If not already done, enable appengine Api and check quota for your project at\r\n# https://console.developers.google.com/apis/api/appengine/quotas \r\n# 2. Install python client library for Google APIs using 'pip install --upgrade google-api-python-client'.\r\n# 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n# https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\n\r\nfrom apiclient import discovery\r\nfrom oauth2client.client import GoogleCredentials\r\nimport json\r\n\r\n# Authentication is provided by gcloud tool when running locally\r\n# and by built-in service accounts when running on GAE, GCE or GKE.\r\n# See https://developers.google.com/identity/protocols/application-default-credentials\r\n# for more information.\r\ncredentials = GoogleCredentials.get_application_default()\r\n\r\n# Construct the service object for interacting with the Compute API -\r\n# the 'appengine' service, at version 'v1beta4'.\r\n# You can browse other available api services and versions here:\r\n# https://developers.google.com/api-client-library/python/apis/\r\nservice = discovery.build('appengine', 'v1beta4', credentials=credentials)\r\n\r\nservice.apps().get(appsId=\"example-appsId\").execute()","go":null,"nodejs":null,"csharp":"// Autogenerated example code for appengine.apps.get\r\n\r\n// PRE-REQUISITES:\r\n// ---------------\r\n// 1. If not already done, enable appengine Api and check quota for your project at\r\n// https://console.developers.google.com/apis/api/appengine/quotas \r\n// 2. Use the nuget package manager to install the package Google.Apis.appengine.v1beta4\r\n// 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n// https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\nusing Google.Apis.Appengine.v1beta4;\r\nusing Google.Apis.Appengine.v1beta4.Data;\r\nusing Google.Apis.Auth.OAuth2;\r\nusing Google.Apis.Services;\r\nusing System;\r\n\r\nclass AppengineSample\r\n{\r\n static void Main()\r\n {\r\n // Authentication is provided by gcloud tool when running locally\r\n // and by built-in service accounts when running on GAE, GCE or GKE.\r\n GoogleCredential credential = GoogleCredential.GetApplicationDefaultAsync().Result;\r\n\r\n // The createScopedRequired method returns true when running on GAE or a local developer\r\n // machine. In that case, the desired scopes must be passed in manually. When the code is\r\n // running in GCE, GKE or a Managed VM, the scopes are pulled from the GCE metadata server.\r\n // See https://developers.google.com/identity/protocols/application-default-credentials for more information.\r\n if (credential.IsCreateScopedRequired)\r\n {\r\n credential = credential.CreateScoped(new[] { \"https://www.googleapis.com/auth/cloud-platform\" });\r\n }\r\n\r\n var appengineService = new AppengineService(new BaseClientService.Initializer() { HttpClientInitializer = credential });\r\n\r\n var request = appengineService.Apps.Get(\"example-appsId\");\r\n var response = request.Execute();\r\n }\r\n}","ruby":null,"php":null}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"metadata":{"apiName":"appengine","apiVersion":"v1beta4","fragmentGenerationVersion":"0.1","generatedOn":"1-21-2016"},"code_fragment":{"java":"// Autogenerated example code for appengine.apps.modules.delete\r\n\r\n// PRE-REQUISITES:\r\n// ---------------\r\n// 1. If not already done, enable appengine Api and check quota for your project at\r\n// https://console.developers.google.com/apis/api/appengine/quotas \r\n// 2. To install the client library on maven or gradle, check installation instructions at \r\n// https://github.com/google/google-api-java-client. \r\n// On other build systems, you can add the jar files to your project from \r\n// https://developers.google.com/resources/api-libraries/download/appengine/v1beta4/java\r\n// 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n// https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\nimport com.google.api.client.googleapis.auth.oauth2.GoogleCredential;\r\nimport com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;\r\nimport com.google.api.client.http.HttpTransport;\r\nimport com.google.api.client.json.JsonFactory;\r\nimport com.google.api.client.json.jackson2.JacksonFactory;\r\nimport com.google.api.services.appengine.Appengine;\r\nimport com.google.api.services.appengine.model.*;\r\n\r\nimport java.io.IOException;\r\nimport java.security.GeneralSecurityException;\r\nimport java.util.Collections;\r\n\r\npublic class AppengineSample {\r\n\tpublic static void main(String[] args) throws IOException, GeneralSecurityException {\r\n\t\t// Authentication is provided by gcloud tool when running locally\r\n\t\t// and by built-in service accounts when running on GAE, GCE or GKE.\r\n\t\tGoogleCredential credential = GoogleCredential.getApplicationDefault();\r\n\t\t\t \r\n\t\t// The createScopedRequired method returns true when running on GAE or a local developer\r\n\t\t// machine. In that case, the desired scopes must be passed in manually. When the code is\r\n\t\t// running in GCE, GKE or a Managed VM, the scopes are pulled from the GCE metadata server.\r\n\t\t// See https://developers.google.com/identity/protocols/application-default-credentials for more information.\r\n\t\tif (credential.createScopedRequired()) {\r\n\t\t\tcredential = credential.createScoped(Collections.singletonList(\"https://www.googleapis.com/auth/cloud-platform\"));\r\n\t\t}\r\n\t\t\t\t\r\n\t\tHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\r\n\t\tJsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); \r\n\t\tAppengine appengineService = new Appengine.Builder(httpTransport, jsonFactory, credential)\r\n\t\t\t.setApplicationName(\"Google Cloud Platform Sample\")\r\n\t\t\t.build();\r\n\r\n\t\tAppengine.Apps.Modules.Delete request = appengineService.apps().modules().delete(\"example-appsId\", \"example-modulesId\");\r\n\t\tOperation response = request.execute();\r\n\t}\r\n}","python":"# Autogenerated example code for appengine.apps.modules.delete\r\n\r\n# PRE-REQUISITES:\r\n# ---------------\r\n# 1. If not already done, enable appengine Api and check quota for your project at\r\n# https://console.developers.google.com/apis/api/appengine/quotas \r\n# 2. Install python client library for Google APIs using 'pip install --upgrade google-api-python-client'.\r\n# 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n# https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\n\r\nfrom apiclient import discovery\r\nfrom oauth2client.client import GoogleCredentials\r\nimport json\r\n\r\n# Authentication is provided by gcloud tool when running locally\r\n# and by built-in service accounts when running on GAE, GCE or GKE.\r\n# See https://developers.google.com/identity/protocols/application-default-credentials\r\n# for more information.\r\ncredentials = GoogleCredentials.get_application_default()\r\n\r\n# Construct the service object for interacting with the Compute API -\r\n# the 'appengine' service, at version 'v1beta4'.\r\n# You can browse other available api services and versions here:\r\n# https://developers.google.com/api-client-library/python/apis/\r\nservice = discovery.build('appengine', 'v1beta4', credentials=credentials)\r\n\r\nservice.apps().modules().delete(appsId=\"example-appsId\", modulesId=\"example-modulesId\").execute()","go":null,"nodejs":null,"csharp":"// Autogenerated example code for appengine.apps.modules.delete\r\n\r\n// PRE-REQUISITES:\r\n// ---------------\r\n// 1. If not already done, enable appengine Api and check quota for your project at\r\n// https://console.developers.google.com/apis/api/appengine/quotas \r\n// 2. Use the nuget package manager to install the package Google.Apis.appengine.v1beta4\r\n// 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n// https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\nusing Google.Apis.Appengine.v1beta4;\r\nusing Google.Apis.Appengine.v1beta4.Data;\r\nusing Google.Apis.Auth.OAuth2;\r\nusing Google.Apis.Services;\r\nusing System;\r\n\r\nclass AppengineSample\r\n{\r\n static void Main()\r\n {\r\n // Authentication is provided by gcloud tool when running locally\r\n // and by built-in service accounts when running on GAE, GCE or GKE.\r\n GoogleCredential credential = GoogleCredential.GetApplicationDefaultAsync().Result;\r\n\r\n // The createScopedRequired method returns true when running on GAE or a local developer\r\n // machine. In that case, the desired scopes must be passed in manually. When the code is\r\n // running in GCE, GKE or a Managed VM, the scopes are pulled from the GCE metadata server.\r\n // See https://developers.google.com/identity/protocols/application-default-credentials for more information.\r\n if (credential.IsCreateScopedRequired)\r\n {\r\n credential = credential.CreateScoped(new[] { \"https://www.googleapis.com/auth/cloud-platform\" });\r\n }\r\n\r\n var appengineService = new AppengineService(new BaseClientService.Initializer() { HttpClientInitializer = credential });\r\n\r\n var request = appengineService.Apps.Modules.Delete(\"example-appsId\", \"example-modulesId\");\r\n var response = request.Execute();\r\n }\r\n}","ruby":null,"php":null}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"metadata":{"apiName":"appengine","apiVersion":"v1beta4","fragmentGenerationVersion":"0.1","generatedOn":"1-21-2016"},"code_fragment":{"java":"// Autogenerated example code for appengine.apps.modules.get\r\n\r\n// PRE-REQUISITES:\r\n// ---------------\r\n// 1. If not already done, enable appengine Api and check quota for your project at\r\n// https://console.developers.google.com/apis/api/appengine/quotas \r\n// 2. To install the client library on maven or gradle, check installation instructions at \r\n// https://github.com/google/google-api-java-client. \r\n// On other build systems, you can add the jar files to your project from \r\n// https://developers.google.com/resources/api-libraries/download/appengine/v1beta4/java\r\n// 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n// https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\nimport com.google.api.client.googleapis.auth.oauth2.GoogleCredential;\r\nimport com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;\r\nimport com.google.api.client.http.HttpTransport;\r\nimport com.google.api.client.json.JsonFactory;\r\nimport com.google.api.client.json.jackson2.JacksonFactory;\r\nimport com.google.api.services.appengine.Appengine;\r\nimport com.google.api.services.appengine.model.*;\r\n\r\nimport java.io.IOException;\r\nimport java.security.GeneralSecurityException;\r\nimport java.util.Collections;\r\n\r\npublic class AppengineSample {\r\n\tpublic static void main(String[] args) throws IOException, GeneralSecurityException {\r\n\t\t// Authentication is provided by gcloud tool when running locally\r\n\t\t// and by built-in service accounts when running on GAE, GCE or GKE.\r\n\t\tGoogleCredential credential = GoogleCredential.getApplicationDefault();\r\n\t\t\t \r\n\t\t// The createScopedRequired method returns true when running on GAE or a local developer\r\n\t\t// machine. In that case, the desired scopes must be passed in manually. When the code is\r\n\t\t// running in GCE, GKE or a Managed VM, the scopes are pulled from the GCE metadata server.\r\n\t\t// See https://developers.google.com/identity/protocols/application-default-credentials for more information.\r\n\t\tif (credential.createScopedRequired()) {\r\n\t\t\tcredential = credential.createScoped(Collections.singletonList(\"https://www.googleapis.com/auth/cloud-platform\"));\r\n\t\t}\r\n\t\t\t\t\r\n\t\tHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\r\n\t\tJsonFactory jsonFactory = JacksonFactory.getDefaultInstance(); \r\n\t\tAppengine appengineService = new Appengine.Builder(httpTransport, jsonFactory, credential)\r\n\t\t\t.setApplicationName(\"Google Cloud Platform Sample\")\r\n\t\t\t.build();\r\n\r\n\t\tAppengine.Apps.Modules.Get request = appengineService.apps().modules().get(\"example-appsId\", \"example-modulesId\");\r\n\t\tModule response = request.execute();\r\n\t}\r\n}","python":"# Autogenerated example code for appengine.apps.modules.get\r\n\r\n# PRE-REQUISITES:\r\n# ---------------\r\n# 1. If not already done, enable appengine Api and check quota for your project at\r\n# https://console.developers.google.com/apis/api/appengine/quotas \r\n# 2. Install python client library for Google APIs using 'pip install --upgrade google-api-python-client'.\r\n# 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n# https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\n\r\nfrom apiclient import discovery\r\nfrom oauth2client.client import GoogleCredentials\r\nimport json\r\n\r\n# Authentication is provided by gcloud tool when running locally\r\n# and by built-in service accounts when running on GAE, GCE or GKE.\r\n# See https://developers.google.com/identity/protocols/application-default-credentials\r\n# for more information.\r\ncredentials = GoogleCredentials.get_application_default()\r\n\r\n# Construct the service object for interacting with the Compute API -\r\n# the 'appengine' service, at version 'v1beta4'.\r\n# You can browse other available api services and versions here:\r\n# https://developers.google.com/api-client-library/python/apis/\r\nservice = discovery.build('appengine', 'v1beta4', credentials=credentials)\r\n\r\nservice.apps().modules().get(appsId=\"example-appsId\", modulesId=\"example-modulesId\").execute()","go":null,"nodejs":null,"csharp":"// Autogenerated example code for appengine.apps.modules.get\r\n\r\n// PRE-REQUISITES:\r\n// ---------------\r\n// 1. If not already done, enable appengine Api and check quota for your project at\r\n// https://console.developers.google.com/apis/api/appengine/quotas \r\n// 2. Use the nuget package manager to install the package Google.Apis.appengine.v1beta4\r\n// 3. This sample uses Application Default Credentials for Auth. If not already done, install gcloud CLI from \r\n// https://cloud.google.com/sdk/ and run 'gcloud auth login'\r\n\r\nusing Google.Apis.Appengine.v1beta4;\r\nusing Google.Apis.Appengine.v1beta4.Data;\r\nusing Google.Apis.Auth.OAuth2;\r\nusing Google.Apis.Services;\r\nusing System;\r\n\r\nclass AppengineSample\r\n{\r\n static void Main()\r\n {\r\n // Authentication is provided by gcloud tool when running locally\r\n // and by built-in service accounts when running on GAE, GCE or GKE.\r\n GoogleCredential credential = GoogleCredential.GetApplicationDefaultAsync().Result;\r\n\r\n // The createScopedRequired method returns true when running on GAE or a local developer\r\n // machine. In that case, the desired scopes must be passed in manually. When the code is\r\n // running in GCE, GKE or a Managed VM, the scopes are pulled from the GCE metadata server.\r\n // See https://developers.google.com/identity/protocols/application-default-credentials for more information.\r\n if (credential.IsCreateScopedRequired)\r\n {\r\n credential = credential.CreateScoped(new[] { \"https://www.googleapis.com/auth/cloud-platform\" });\r\n }\r\n\r\n var appengineService = new AppengineService(new BaseClientService.Initializer() { HttpClientInitializer = credential });\r\n\r\n var request = appengineService.Apps.Modules.Get(\"example-appsId\", \"example-modulesId\");\r\n var response = request.Execute();\r\n }\r\n}","ruby":null,"php":null}} |
Oops, something went wrong.