Updated to 2022/04/04.(commit id: ee87eb0)
This commit is contained in:
parent
2781fbf540
commit
7dd4f16190
|
@ -0,0 +1,12 @@
|
|||
# Code owners file.
|
||||
# This file controls who is tagged for review for any given pull request.
|
||||
#
|
||||
# For syntax help see:
|
||||
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
|
||||
|
||||
# Default: Yoshi-Ruby team
|
||||
* @googleapis/yoshi-ruby
|
||||
|
||||
# Autogeneration PRs should be handled by yoshi-approver
|
||||
/generated/ @yoshi-approver
|
||||
/api_names_out.yaml @yoshi-approver
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"extends": [
|
||||
"config:base"
|
||||
],
|
||||
"includePaths": [
|
||||
"*",
|
||||
"samples/**/*",
|
||||
"google-apis-core/**/*",
|
||||
"google-apis-generator/**/*",
|
||||
"google-api-client/**/*",
|
||||
"generated/google-apis-discovery_v1/**/*"
|
||||
],
|
||||
"rangeStrategy": "widen"
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
name: CI
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
CI:
|
||||
if: ${{ github.repository == 'googleapis/google-api-ruby-client' }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
ruby: "2.5"
|
||||
task: "--include-spec"
|
||||
- os: ubuntu-latest
|
||||
ruby: "2.6"
|
||||
task: "--include-spec"
|
||||
- os: ubuntu-latest
|
||||
ruby: "2.7"
|
||||
task: "--include-spec --include-yardoc --include-build"
|
||||
- os: ubuntu-latest
|
||||
ruby: "3.0"
|
||||
task: "--include-spec"
|
||||
- os: ubuntu-latest
|
||||
ruby: "3.1"
|
||||
task: "--include-spec"
|
||||
- os: macos-latest
|
||||
ruby: "2.7"
|
||||
task: "--include-spec"
|
||||
- os: windows-latest
|
||||
ruby: "2.7"
|
||||
task: "--include-spec"
|
||||
fail-fast: false
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Install Ruby ${{ matrix.ruby }}
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "${{ matrix.ruby }}"
|
||||
- name: Install tools
|
||||
run: "gem install --no-document toys"
|
||||
- name: Test ${{ matrix.task }}
|
||||
run: toys ci -v --only ${{ matrix.task }} --github-event-name=${{ github.event_name }} --github-event-payload=${{ github.event_path }}
|
|
@ -0,0 +1,24 @@
|
|||
name: Daily-Generate-Updates
|
||||
on:
|
||||
schedule:
|
||||
- cron: '02 11 * * *'
|
||||
|
||||
jobs:
|
||||
generate-updates:
|
||||
if: ${{ github.repository == 'googleapis/google-api-ruby-client' }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
|
||||
APPROVAL_GITHUB_TOKEN: ${{secrets.YOSHI_APPROVER_TOKEN}}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Install Ruby 3.0
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "3.0"
|
||||
- name: Install tools
|
||||
run: "gem install --no-document toys"
|
||||
- name: execute
|
||||
run: |
|
||||
toys generate-updates -v --fork --all --clean
|
|
@ -0,0 +1,27 @@
|
|||
name: Generate-Updates
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
args:
|
||||
description: "Extra command line arguments."
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
generate-updates:
|
||||
if: ${{ github.repository == 'googleapis/google-api-ruby-client' }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
|
||||
APPROVAL_GITHUB_TOKEN: ${{secrets.YOSHI_APPROVER_TOKEN}}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Install Ruby 3.0
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "3.0"
|
||||
- name: Install tools
|
||||
run: "gem install --no-document toys"
|
||||
- name: execute
|
||||
run: |
|
||||
toys generate-updates -v --fork ${{ github.event.inputs.args }}
|
|
@ -0,0 +1,25 @@
|
|||
name: release-please-label
|
||||
on:
|
||||
pull_request_target:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- opened
|
||||
jobs:
|
||||
release-please-label:
|
||||
if: "${{ github.event.sender.login == 'yoshi-code-bot' && startsWith(github.event.pull_request.title, 'chore: release ') }}"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: ReleaseLabel
|
||||
uses: actions/github-script@v4
|
||||
with:
|
||||
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
|
||||
script: |
|
||||
core.info('Labeling release');
|
||||
await github.issues.addLabels({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.payload.pull_request.number,
|
||||
labels: ['autorelease: pending']
|
||||
});
|
||||
core.info('Labeled');
|
|
@ -0,0 +1,38 @@
|
|||
name: Release-Please
|
||||
on:
|
||||
schedule:
|
||||
- cron: '37 8 * * *'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
gem:
|
||||
description: "Name of single gem to release. Leave blank to check all gems."
|
||||
required: false
|
||||
args:
|
||||
description: "Extra command line arguments."
|
||||
required: false
|
||||
|
||||
jobs:
|
||||
release-please:
|
||||
if: ${{ github.repository == 'googleapis/google-api-ruby-client' }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
|
||||
RELEASE_PLEASE_DISABLE: ${{ secrets.RELEASE_PLEASE_DISABLE }}
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v2
|
||||
- name: Install Ruby 2.7
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "2.7"
|
||||
- name: Install NodeJS 12.x
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "12.x"
|
||||
- name: Install tools
|
||||
run: "gem install --no-document toys && npm install release-please"
|
||||
- name: execute
|
||||
run: |
|
||||
toys release please -v --fork \
|
||||
--github-event-name=${{ github.event_name }} \
|
||||
${{ github.event.inputs.args }} -- ${{ github.event.inputs.gem }}
|
|
@ -21,3 +21,6 @@ atlassian*
|
|||
|
||||
__pycache__/
|
||||
/vendor/
|
||||
|
||||
/node-modules/
|
||||
/package-lock.json
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Build logs will be here
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "**/*sponge_log.xml"
|
||||
}
|
||||
}
|
||||
|
||||
# Download resources for system tests (service account key, etc.)
|
||||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
|
||||
|
||||
# Download trampoline resources.
|
||||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
|
||||
|
||||
# Use the trampoline script to run in docker.
|
||||
build_file: "google-api-ruby-client/.kokoro/trampoline_v2.sh"
|
||||
|
||||
# Configure the docker image for kokoro-trampoline.
|
||||
env_vars: {
|
||||
key: "TRAMPOLINE_IMAGE"
|
||||
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "SECRET_MANAGER_KEYS"
|
||||
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem,docuploader_service_account"
|
||||
}
|
|
@ -0,0 +1,76 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2020 Google LLC.
|
||||
#
|
||||
# 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.
|
||||
|
||||
# This file is called in the early stage of `trampoline_v2.sh` to
|
||||
# populate secrets needed for the CI builds.
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;}
|
||||
function msg { println "$*" >&2 ;}
|
||||
function println { printf '%s\n' "$(now) $*" ;}
|
||||
|
||||
# Populates requested secrets set in SECRET_MANAGER_KEYS
|
||||
|
||||
# In Kokoro CI builds, we use the service account attached to the
|
||||
# Kokoro VM. This means we need to setup auth on other CI systems.
|
||||
# For local run, we just use the gcloud command for retrieving the
|
||||
# secrets.
|
||||
|
||||
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
|
||||
GCLOUD_COMMANDS=(
|
||||
"docker"
|
||||
"run"
|
||||
"--entrypoint=gcloud"
|
||||
"--volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR}"
|
||||
"gcr.io/google.com/cloudsdktool/cloud-sdk"
|
||||
)
|
||||
if [[ "${TRAMPOLINE_CI:-}" == "kokoro" ]]; then
|
||||
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
|
||||
else
|
||||
echo "Authentication for this CI system is not implemented yet."
|
||||
exit 2
|
||||
# TODO: Determine appropriate SECRET_LOCATION and the GCLOUD_COMMANDS.
|
||||
fi
|
||||
else
|
||||
# For local run, use /dev/shm or temporary directory for
|
||||
# KOKORO_GFILE_DIR.
|
||||
if [[ -d "/dev/shm" ]]; then
|
||||
export KOKORO_GFILE_DIR=/dev/shm
|
||||
else
|
||||
export KOKORO_GFILE_DIR=$(mktemp -d -t ci-XXXXXXXX)
|
||||
fi
|
||||
SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager"
|
||||
GCLOUD_COMMANDS=("gcloud")
|
||||
fi
|
||||
|
||||
msg "Creating folder on disk for secrets: ${SECRET_LOCATION}"
|
||||
mkdir -p ${SECRET_LOCATION}
|
||||
|
||||
for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g")
|
||||
do
|
||||
msg "Retrieving secret ${key}"
|
||||
"${GCLOUD_COMMANDS[@]}" \
|
||||
secrets versions access latest \
|
||||
--project cloud-devrel-kokoro-resources \
|
||||
--secret $key > \
|
||||
"$SECRET_LOCATION/$key"
|
||||
if [[ $? == 0 ]]; then
|
||||
msg "Secret written to ${SECRET_LOCATION}/${key}"
|
||||
else
|
||||
msg "Error retrieving secret ${key}"
|
||||
exit 2
|
||||
fi
|
||||
done
|
|
@ -0,0 +1,6 @@
|
|||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
env_vars: {
|
||||
key: "TRAMPOLINE_BUILD_FILE"
|
||||
value: ".kokoro/release-generated.sh"
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
# Install gems in the user directory because the default install directory
|
||||
# is in a read-only location.
|
||||
export GEM_HOME=$HOME/.gem
|
||||
export PATH=$GEM_HOME/bin:$PATH
|
||||
|
||||
python3 -m pip install git+https://github.com/googleapis/releasetool
|
||||
python3 -m pip install gcp-docuploader
|
||||
gem install --no-document toys
|
||||
|
||||
# This is not called from autorelease, so don't run publish-reporter-script
|
||||
toys release perform -v --base-dir=generated --all=^google-apis- --enable-docs < /dev/null
|
|
@ -1,94 +1,6 @@
|
|||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
# Build logs will be here
|
||||
action {
|
||||
define_artifacts {
|
||||
regex: "**/*sponge_log.xml"
|
||||
}
|
||||
}
|
||||
|
||||
# Fetch the token needed for reporting release status to GitHub
|
||||
before_action {
|
||||
fetch_keystore {
|
||||
keystore_resource {
|
||||
keystore_config_id: 73713
|
||||
keyname: "yoshi-automation-github-key"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Fetch magictoken to use with Magic Github Proxy
|
||||
before_action {
|
||||
fetch_keystore {
|
||||
keystore_resource {
|
||||
keystore_config_id: 73713
|
||||
keyname: "releasetool-magictoken"
|
||||
backend_type: FASTCONFIGPUSH
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Fetch api key to use with Magic Github Proxy
|
||||
before_action {
|
||||
fetch_keystore {
|
||||
keystore_resource {
|
||||
keystore_config_id: 73713
|
||||
keyname: "magic-github-proxy-api-key"
|
||||
backend_type: FASTCONFIGPUSH
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
before_action {
|
||||
fetch_keystore {
|
||||
keystore_resource {
|
||||
keystore_config_id: 73713
|
||||
keyname: "docuploader_service_account"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Download resources for system tests (service account key, etc.)
|
||||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-ruby"
|
||||
|
||||
# Download trampoline resources.
|
||||
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
|
||||
|
||||
# Use the trampoline script to run in docker.
|
||||
build_file: "google-api-ruby-client/.kokoro/trampoline.sh"
|
||||
|
||||
# Configure the docker image for kokoro-trampoline.
|
||||
env_vars: {
|
||||
key: "TRAMPOLINE_IMAGE"
|
||||
value: "gcr.io/cloud-devrel-kokoro-resources/yoshi-ruby/release"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "TRAMPOLINE_BUILD_FILE"
|
||||
value: "github/google-api-ruby-client/.kokoro/build.sh"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "TRAMPOLINE_SCRIPT"
|
||||
value: "trampoline_v1.py"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "JOB_TYPE"
|
||||
value: "release"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "OS"
|
||||
value: "linux"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "REPO_DIR"
|
||||
value: "github/google-api-ruby-client"
|
||||
}
|
||||
|
||||
env_vars: {
|
||||
key: "PACKAGE"
|
||||
value: "google-api-client"
|
||||
value: ".kokoro/release.sh"
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
# Install gems in the user directory because the default install directory
|
||||
# is in a read-only location.
|
||||
export GEM_HOME=$HOME/.gem
|
||||
export PATH=$GEM_HOME/bin:$PATH
|
||||
|
||||
python3 -m pip install git+https://github.com/googleapis/releasetool
|
||||
python3 -m pip install gcp-docuploader
|
||||
gem install --no-document toys
|
||||
|
||||
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
|
||||
toys release perform -v --enable-docs < /dev/null
|
|
@ -0,0 +1,489 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright 2020 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
# trampoline_v2.sh
|
||||
#
|
||||
# If you want to make a change to this file, consider doing so at:
|
||||
# https://github.com/googlecloudplatform/docker-ci-helper
|
||||
#
|
||||
# This script is for running CI builds. For Kokoro builds, we
|
||||
# set this script to `build_file` field in the Kokoro configuration.
|
||||
|
||||
# This script does 3 things.
|
||||
#
|
||||
# 1. Prepare the Docker image for the test
|
||||
# 2. Run the Docker with appropriate flags to run the test
|
||||
# 3. Upload the newly built Docker image
|
||||
#
|
||||
# in a way that is somewhat compatible with trampoline_v1.
|
||||
#
|
||||
# These environment variables are required:
|
||||
# TRAMPOLINE_IMAGE: The docker image to use.
|
||||
# TRAMPOLINE_DOCKERFILE: The location of the Dockerfile.
|
||||
#
|
||||
# You can optionally change these environment variables:
|
||||
# TRAMPOLINE_IMAGE_UPLOAD:
|
||||
# (true|false): Whether to upload the Docker image after the
|
||||
# successful builds.
|
||||
# TRAMPOLINE_BUILD_FILE: The script to run in the docker container.
|
||||
# TRAMPOLINE_WORKSPACE: The workspace path in the docker container.
|
||||
# Defaults to /workspace.
|
||||
# Potentially there are some repo specific envvars in .trampolinerc in
|
||||
# the project root.
|
||||
#
|
||||
# Here is an example for running this script.
|
||||
# TRAMPOLINE_IMAGE=gcr.io/cloud-devrel-kokoro-resources/node:10-user \
|
||||
# TRAMPOLINE_BUILD_FILE=.kokoro/system-test.sh \
|
||||
# .kokoro/trampoline_v2.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
TRAMPOLINE_VERSION="2.0.10"
|
||||
|
||||
if command -v tput >/dev/null && [[ -n "${TERM:-}" ]]; then
|
||||
readonly IO_COLOR_RED="$(tput setaf 1)"
|
||||
readonly IO_COLOR_GREEN="$(tput setaf 2)"
|
||||
readonly IO_COLOR_YELLOW="$(tput setaf 3)"
|
||||
readonly IO_COLOR_RESET="$(tput sgr0)"
|
||||
else
|
||||
readonly IO_COLOR_RED=""
|
||||
readonly IO_COLOR_GREEN=""
|
||||
readonly IO_COLOR_YELLOW=""
|
||||
readonly IO_COLOR_RESET=""
|
||||
fi
|
||||
|
||||
function function_exists {
|
||||
[ $(LC_ALL=C type -t $1)"" == "function" ]
|
||||
}
|
||||
|
||||
# Logs a message using the given color. The first argument must be one
|
||||
# of the IO_COLOR_* variables defined above, such as
|
||||
# "${IO_COLOR_YELLOW}". The remaining arguments will be logged in the
|
||||
# given color. The log message will also have an RFC-3339 timestamp
|
||||
# prepended (in UTC). You can disable the color output by setting
|
||||
# TERM=vt100.
|
||||
function log_impl() {
|
||||
local color="$1"
|
||||
shift
|
||||
local timestamp="$(date -u "+%Y-%m-%dT%H:%M:%SZ")"
|
||||
echo "================================================================"
|
||||
echo "${color}${timestamp}:" "$@" "${IO_COLOR_RESET}"
|
||||
echo "================================================================"
|
||||
}
|
||||
|
||||
# Logs the given message with normal coloring and a timestamp.
|
||||
function log() {
|
||||
log_impl "${IO_COLOR_RESET}" "$@"
|
||||
}
|
||||
|
||||
# Logs the given message in green with a timestamp.
|
||||
function log_green() {
|
||||
log_impl "${IO_COLOR_GREEN}" "$@"
|
||||
}
|
||||
|
||||
# Logs the given message in yellow with a timestamp.
|
||||
function log_yellow() {
|
||||
log_impl "${IO_COLOR_YELLOW}" "$@"
|
||||
}
|
||||
|
||||
# Logs the given message in red with a timestamp.
|
||||
function log_red() {
|
||||
log_impl "${IO_COLOR_RED}" "$@"
|
||||
}
|
||||
|
||||
readonly tmpdir=$(mktemp -d -t ci-XXXXXXXX)
|
||||
readonly tmphome="${tmpdir}/h"
|
||||
mkdir -p "${tmphome}"
|
||||
|
||||
function cleanup() {
|
||||
rm -rf "${tmpdir}"
|
||||
}
|
||||
trap cleanup EXIT
|
||||
|
||||
RUNNING_IN_CI="${RUNNING_IN_CI:-false}"
|
||||
|
||||
# The workspace in the container, defaults to /workspace.
|
||||
TRAMPOLINE_WORKSPACE="${TRAMPOLINE_WORKSPACE:-/workspace}"
|
||||
|
||||
pass_down_envvars=(
|
||||
# TRAMPOLINE_V2 variables.
|
||||
# Tells scripts whether they are running as part of CI or not.
|
||||
"RUNNING_IN_CI"
|
||||
# Indicates which CI system we're in.
|
||||
"TRAMPOLINE_CI"
|
||||
# Indicates the version of the script.
|
||||
"TRAMPOLINE_VERSION"
|
||||
)
|
||||
|
||||
log_yellow "Building with Trampoline ${TRAMPOLINE_VERSION}"
|
||||
|
||||
# Detect which CI systems we're in. If we're in any of the CI systems
|
||||
# we support, `RUNNING_IN_CI` will be true and `TRAMPOLINE_CI` will be
|
||||
# the name of the CI system. Both envvars will be passing down to the
|
||||
# container for telling which CI system we're in.
|
||||
if [[ -n "${KOKORO_BUILD_ID:-}" ]]; then
|
||||
# descriptive env var for indicating it's on CI.
|
||||
RUNNING_IN_CI="true"
|
||||
TRAMPOLINE_CI="kokoro"
|
||||
if [[ "${TRAMPOLINE_USE_LEGACY_SERVICE_ACCOUNT:-}" == "true" ]]; then
|
||||
if [[ ! -f "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json" ]]; then
|
||||
log_red "${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json does not exist. Did you forget to mount cloud-devrel-kokoro-resources/trampoline? Aborting."
|
||||
exit 1
|
||||
fi
|
||||
# This service account will be activated later.
|
||||
TRAMPOLINE_SERVICE_ACCOUNT="${KOKORO_GFILE_DIR}/kokoro-trampoline.service-account.json"
|
||||
else
|
||||
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
|
||||
gcloud auth list
|
||||
fi
|
||||
log_yellow "Configuring Container Registry access"
|
||||
gcloud auth configure-docker --quiet
|
||||
fi
|
||||
pass_down_envvars+=(
|
||||
# KOKORO dynamic variables.
|
||||
"KOKORO_BUILD_NUMBER"
|
||||
"KOKORO_BUILD_ID"
|
||||
"KOKORO_JOB_NAME"
|
||||
"KOKORO_GIT_COMMIT"
|
||||
"KOKORO_GITHUB_COMMIT"
|
||||
"KOKORO_GITHUB_PULL_REQUEST_NUMBER"
|
||||
"KOKORO_GITHUB_PULL_REQUEST_COMMIT"
|
||||
# For Flaky Bot
|
||||
"KOKORO_GITHUB_COMMIT_URL"
|
||||
"KOKORO_GITHUB_PULL_REQUEST_URL"
|
||||
"KOKORO_BUILD_ARTIFACTS_SUBDIR"
|
||||
)
|
||||
elif [[ "${TRAVIS:-}" == "true" ]]; then
|
||||
RUNNING_IN_CI="true"
|
||||
TRAMPOLINE_CI="travis"
|
||||
pass_down_envvars+=(
|
||||
"TRAVIS_BRANCH"
|
||||
"TRAVIS_BUILD_ID"
|
||||
"TRAVIS_BUILD_NUMBER"
|
||||
"TRAVIS_BUILD_WEB_URL"
|
||||
"TRAVIS_COMMIT"
|
||||
"TRAVIS_COMMIT_MESSAGE"
|
||||
"TRAVIS_COMMIT_RANGE"
|
||||
"TRAVIS_JOB_NAME"
|
||||
"TRAVIS_JOB_NUMBER"
|
||||
"TRAVIS_JOB_WEB_URL"
|
||||
"TRAVIS_PULL_REQUEST"
|
||||
"TRAVIS_PULL_REQUEST_BRANCH"
|
||||
"TRAVIS_PULL_REQUEST_SHA"
|
||||
"TRAVIS_PULL_REQUEST_SLUG"
|
||||
"TRAVIS_REPO_SLUG"
|
||||
"TRAVIS_SECURE_ENV_VARS"
|
||||
"TRAVIS_TAG"
|
||||
)
|
||||
elif [[ -n "${GITHUB_RUN_ID:-}" ]]; then
|
||||
RUNNING_IN_CI="true"
|
||||
TRAMPOLINE_CI="github-workflow"
|
||||
pass_down_envvars+=(
|
||||
"GITHUB_WORKFLOW"
|
||||
"GITHUB_RUN_ID"
|
||||
"GITHUB_RUN_NUMBER"
|
||||
"GITHUB_ACTION"
|
||||
"GITHUB_ACTIONS"
|
||||
"GITHUB_ACTOR"
|
||||
"GITHUB_REPOSITORY"
|
||||
"GITHUB_EVENT_NAME"
|
||||
"GITHUB_EVENT_PATH"
|
||||
"GITHUB_SHA"
|
||||
"GITHUB_REF"
|
||||
"GITHUB_HEAD_REF"
|
||||
"GITHUB_BASE_REF"
|
||||
)
|
||||
elif [[ "${CIRCLECI:-}" == "true" ]]; then
|
||||
RUNNING_IN_CI="true"
|
||||
TRAMPOLINE_CI="circleci"
|
||||
pass_down_envvars+=(
|
||||
"CIRCLE_BRANCH"
|
||||
"CIRCLE_BUILD_NUM"
|
||||
"CIRCLE_BUILD_URL"
|
||||
"CIRCLE_COMPARE_URL"
|
||||
"CIRCLE_JOB"
|
||||
"CIRCLE_NODE_INDEX"
|
||||
"CIRCLE_NODE_TOTAL"
|
||||
"CIRCLE_PREVIOUS_BUILD_NUM"
|
||||
"CIRCLE_PROJECT_REPONAME"
|
||||
"CIRCLE_PROJECT_USERNAME"
|
||||
"CIRCLE_REPOSITORY_URL"
|
||||
"CIRCLE_SHA1"
|
||||
"CIRCLE_STAGE"
|
||||
"CIRCLE_USERNAME"
|
||||
"CIRCLE_WORKFLOW_ID"
|
||||
"CIRCLE_WORKFLOW_JOB_ID"
|
||||
"CIRCLE_WORKFLOW_UPSTREAM_JOB_IDS"
|
||||
"CIRCLE_WORKFLOW_WORKSPACE_ID"
|
||||
)
|
||||
fi
|
||||
|
||||
# Configure the service account for pulling the docker image.
|
||||
function repo_root() {
|
||||
local dir="$1"
|
||||
while [[ ! -d "${dir}/.git" ]]; do
|
||||
dir="$(dirname "$dir")"
|
||||
done
|
||||
echo "${dir}"
|
||||
}
|
||||
|
||||
# Detect the project root. In CI builds, we assume the script is in
|
||||
# the git tree and traverse from there, otherwise, traverse from `pwd`
|
||||
# to find `.git` directory.
|
||||
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
|
||||
PROGRAM_PATH="$(realpath "$0")"
|
||||
PROGRAM_DIR="$(dirname "${PROGRAM_PATH}")"
|
||||
PROJECT_ROOT="$(repo_root "${PROGRAM_DIR}")"
|
||||
else
|
||||
PROJECT_ROOT="$(repo_root $(pwd))"
|
||||
fi
|
||||
|
||||
log_yellow "Changing to the project root: ${PROJECT_ROOT}."
|
||||
cd "${PROJECT_ROOT}"
|
||||
|
||||
# To support relative path for `TRAMPOLINE_SERVICE_ACCOUNT`, we need
|
||||
# to use this environment variable in `PROJECT_ROOT`.
|
||||
if [[ -n "${TRAMPOLINE_SERVICE_ACCOUNT:-}" ]]; then
|
||||
|
||||
mkdir -p "${tmpdir}/gcloud"
|
||||
gcloud_config_dir="${tmpdir}/gcloud"
|
||||
|
||||
log_yellow "Using isolated gcloud config: ${gcloud_config_dir}."
|
||||
export CLOUDSDK_CONFIG="${gcloud_config_dir}"
|
||||
|
||||
log_yellow "Using ${TRAMPOLINE_SERVICE_ACCOUNT} for authentication."
|
||||
gcloud auth activate-service-account \
|
||||
--key-file "${TRAMPOLINE_SERVICE_ACCOUNT}"
|
||||
log_yellow "Configuring Container Registry access"
|
||||
gcloud auth configure-docker --quiet
|
||||
fi
|
||||
|
||||
required_envvars=(
|
||||
# The basic trampoline configurations.
|
||||
"TRAMPOLINE_IMAGE"
|
||||
"TRAMPOLINE_BUILD_FILE"
|
||||
)
|
||||
|
||||
if [[ -f "${PROJECT_ROOT}/.trampolinerc" ]]; then
|
||||
source "${PROJECT_ROOT}/.trampolinerc"
|
||||
fi
|
||||
|
||||
log_yellow "Checking environment variables."
|
||||
for e in "${required_envvars[@]}"
|
||||
do
|
||||
if [[ -z "${!e:-}" ]]; then
|
||||
log "Missing ${e} env var. Aborting."
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# We want to support legacy style TRAMPOLINE_BUILD_FILE used with V1
|
||||
# script: e.g. "github/repo-name/.kokoro/run_tests.sh"
|
||||
TRAMPOLINE_BUILD_FILE="${TRAMPOLINE_BUILD_FILE#github/*/}"
|
||||
log_yellow "Using TRAMPOLINE_BUILD_FILE: ${TRAMPOLINE_BUILD_FILE}"
|
||||
|
||||
# ignore error on docker operations and test execution
|
||||
set +e
|
||||
|
||||
log_yellow "Preparing Docker image."
|
||||
# We only download the docker image in CI builds.
|
||||
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
|
||||
# Download the docker image specified by `TRAMPOLINE_IMAGE`
|
||||
|
||||
# We may want to add --max-concurrent-downloads flag.
|
||||
|
||||
log_yellow "Start pulling the Docker image: ${TRAMPOLINE_IMAGE}."
|
||||
if docker pull "${TRAMPOLINE_IMAGE}"; then
|
||||
log_green "Finished pulling the Docker image: ${TRAMPOLINE_IMAGE}."
|
||||
has_image="true"
|
||||
else
|
||||
log_red "Failed pulling the Docker image: ${TRAMPOLINE_IMAGE}."
|
||||
has_image="false"
|
||||
fi
|
||||
else
|
||||
# For local run, check if we have the image.
|
||||
if docker images "${TRAMPOLINE_IMAGE}" | grep "${TRAMPOLINE_IMAGE%:*}"; then
|
||||
has_image="true"
|
||||
else
|
||||
has_image="false"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# The default user for a Docker container has uid 0 (root). To avoid
|
||||
# creating root-owned files in the build directory we tell docker to
|
||||
# use the current user ID.
|
||||
user_uid="$(id -u)"
|
||||
user_gid="$(id -g)"
|
||||
user_name="$(id -un)"
|
||||
|
||||
# To allow docker in docker, we add the user to the docker group in
|
||||
# the host os.
|
||||
docker_gid=$(cut -d: -f3 < <(getent group docker))
|
||||
|
||||
update_cache="false"
|
||||
if [[ "${TRAMPOLINE_DOCKERFILE:-none}" != "none" ]]; then
|
||||
# Build the Docker image from the source.
|
||||
context_dir=$(dirname "${TRAMPOLINE_DOCKERFILE}")
|
||||
docker_build_flags=(
|
||||
"-f" "${TRAMPOLINE_DOCKERFILE}"
|
||||
"-t" "${TRAMPOLINE_IMAGE}"
|
||||
"--build-arg" "UID=${user_uid}"
|
||||
"--build-arg" "USERNAME=${user_name}"
|
||||
)
|
||||
if [[ "${has_image}" == "true" ]]; then
|
||||
docker_build_flags+=("--cache-from" "${TRAMPOLINE_IMAGE}")
|
||||
fi
|
||||
|
||||
log_yellow "Start building the docker image."
|
||||
if [[ "${TRAMPOLINE_VERBOSE:-false}" == "true" ]]; then
|
||||
echo "docker build" "${docker_build_flags[@]}" "${context_dir}"
|
||||
fi
|
||||
|
||||
# ON CI systems, we want to suppress docker build logs, only
|
||||
# output the logs when it fails.
|
||||
if [[ "${RUNNING_IN_CI:-}" == "true" ]]; then
|
||||
if docker build "${docker_build_flags[@]}" "${context_dir}" \
|
||||
> "${tmpdir}/docker_build.log" 2>&1; then
|
||||
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
|
||||
cat "${tmpdir}/docker_build.log"
|
||||
fi
|
||||
|
||||
log_green "Finished building the docker image."
|
||||
update_cache="true"
|
||||
else
|
||||
log_red "Failed to build the Docker image, aborting."
|
||||
log_yellow "Dumping the build logs:"
|
||||
cat "${tmpdir}/docker_build.log"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if docker build "${docker_build_flags[@]}" "${context_dir}"; then
|
||||
log_green "Finished building the docker image."
|
||||
update_cache="true"
|
||||
else
|
||||
log_red "Failed to build the Docker image, aborting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ "${has_image}" != "true" ]]; then
|
||||
log_red "We do not have ${TRAMPOLINE_IMAGE} locally, aborting."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# We use an array for the flags so they are easier to document.
|
||||
docker_flags=(
|
||||
# Remove the container after it exists.
|
||||
"--rm"
|
||||
|
||||
# Use the host network.
|
||||
"--network=host"
|
||||
|
||||
# Run in priviledged mode. We are not using docker for sandboxing or
|
||||
# isolation, just for packaging our dev tools.
|
||||
"--privileged"
|
||||
|
||||
# Run the docker script with the user id. Because the docker image gets to
|
||||
# write in ${PWD} you typically want this to be your user id.
|
||||
# To allow docker in docker, we need to use docker gid on the host.
|
||||
"--user" "${user_uid}:${docker_gid}"
|
||||
|
||||
# Pass down the USER.
|
||||
"--env" "USER=${user_name}"
|
||||
|
||||
# Mount the project directory inside the Docker container.
|
||||
"--volume" "${PROJECT_ROOT}:${TRAMPOLINE_WORKSPACE}"
|
||||
"--workdir" "${TRAMPOLINE_WORKSPACE}"
|
||||
"--env" "PROJECT_ROOT=${TRAMPOLINE_WORKSPACE}"
|
||||
|
||||
# Mount the temporary home directory.
|
||||
"--volume" "${tmphome}:/h"
|
||||
"--env" "HOME=/h"
|
||||
|
||||
# Allow docker in docker.
|
||||
"--volume" "/var/run/docker.sock:/var/run/docker.sock"
|
||||
|
||||
# Mount the /tmp so that docker in docker can mount the files
|
||||
# there correctly.
|
||||
"--volume" "/tmp:/tmp"
|
||||
# Pass down the KOKORO_GFILE_DIR and KOKORO_KEYSTORE_DIR
|
||||
# TODO(tmatsuo): This part is not portable.
|
||||
"--env" "TRAMPOLINE_SECRET_DIR=/secrets"
|
||||
"--volume" "${KOKORO_GFILE_DIR:-/dev/shm}:/secrets/gfile"
|
||||
"--env" "KOKORO_GFILE_DIR=/secrets/gfile"
|
||||
"--volume" "${KOKORO_KEYSTORE_DIR:-/dev/shm}:/secrets/keystore"
|
||||
"--env" "KOKORO_KEYSTORE_DIR=/secrets/keystore"
|
||||
)
|
||||
|
||||
# Add an option for nicer output if the build gets a tty.
|
||||
if [[ -t 0 ]]; then
|
||||
docker_flags+=("-it")
|
||||
fi
|
||||
|
||||
# Passing down env vars
|
||||
for e in "${pass_down_envvars[@]}"
|
||||
do
|
||||
if [[ -n "${!e:-}" ]]; then
|
||||
docker_flags+=("--env" "${e}=${!e}")
|
||||
fi
|
||||
done
|
||||
|
||||
# If arguments are given, all arguments will become the commands run
|
||||
# in the container, otherwise run TRAMPOLINE_BUILD_FILE.
|
||||
if [[ $# -ge 1 ]]; then
|
||||
log_yellow "Running the given commands '" "${@:1}" "' in the container."
|
||||
readonly commands=("${@:1}")
|
||||
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
|
||||
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
|
||||
fi
|
||||
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}" "${commands[@]}"
|
||||
else
|
||||
log_yellow "Running the tests in a Docker container."
|
||||
docker_flags+=("--entrypoint=${TRAMPOLINE_BUILD_FILE}")
|
||||
if [[ "${TRAMPOLINE_VERBOSE:-}" == "true" ]]; then
|
||||
echo docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}"
|
||||
fi
|
||||
docker run "${docker_flags[@]}" "${TRAMPOLINE_IMAGE}"
|
||||
fi
|
||||
|
||||
|
||||
test_retval=$?
|
||||
|
||||
if [[ ${test_retval} -eq 0 ]]; then
|
||||
log_green "Build finished with ${test_retval}"
|
||||
else
|
||||
log_red "Build finished with ${test_retval}"
|
||||
fi
|
||||
|
||||
# Only upload it when the test passes.
|
||||
if [[ "${update_cache}" == "true" ]] && \
|
||||
[[ $test_retval == 0 ]] && \
|
||||
[[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]]; then
|
||||
log_yellow "Uploading the Docker image."
|
||||
if docker push "${TRAMPOLINE_IMAGE}"; then
|
||||
log_green "Finished uploading the Docker image."
|
||||
else
|
||||
log_red "Failed uploading the Docker image."
|
||||
fi
|
||||
# Call trampoline_after_upload_hook if it's defined.
|
||||
if function_exists trampoline_after_upload_hook; then
|
||||
trampoline_after_upload_hook
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
exit "${test_retval}"
|
|
@ -0,0 +1,24 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
expand :clean, paths: :gitignore
|
||||
|
||||
if ENV["RUBY_COMMON_TOOLS"]
|
||||
common_tools_dir = File.expand_path ENV["RUBY_COMMON_TOOLS"]
|
||||
load File.join(common_tools_dir, "toys", "yoshi")
|
||||
else
|
||||
load_git remote: "https://github.com/googleapis/ruby-common-tools.git",
|
||||
path: "toys/yoshi",
|
||||
update: true
|
||||
end
|
|
@ -0,0 +1,44 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
require "pathname"
|
||||
base_dir = Pathname.new context_directory
|
||||
cur_dir = Pathname.new Dir.getwd
|
||||
unless base_dir == cur_dir
|
||||
relative_path = cur_dir.relative_path_from(base_dir).to_s.split("/")
|
||||
set_context_directory base_dir.join(*relative_path[0..1]).to_s
|
||||
if relative_path.first == "generated" && relative_path.size >= 2
|
||||
|
||||
expand :rspec do |t|
|
||||
t.libs = ["lib", "spec"]
|
||||
t.use_bundler
|
||||
end
|
||||
|
||||
expand :yardoc do |t|
|
||||
t.generate_output_flag = true
|
||||
t.use_bundler
|
||||
end
|
||||
|
||||
expand :gem_build
|
||||
|
||||
elsif ["google-apis-core", "google-apis-generator"].include? relative_path.first
|
||||
|
||||
tool "spec", delegate_to: ["spec"]
|
||||
|
||||
tool "yardoc", delegate_to: ["yardoc"]
|
||||
|
||||
tool "build", delegate_to: ["build"]
|
||||
|
||||
end
|
||||
end
|
|
@ -0,0 +1,129 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
require "json"
|
||||
require "set"
|
||||
|
||||
flag :github_event_name, "--github-event-name PATH"
|
||||
flag :github_event_payload, "--github-event-payload PATH"
|
||||
flag :from_commit, "--from COMMIT"
|
||||
flag :only, "--only"
|
||||
flag :include_spec, "--[no-]include-spec"
|
||||
flag :include_yardoc, "--[no-]include-yardoc"
|
||||
flag :include_build, "--[no-]include-build"
|
||||
|
||||
include :exec, e: true
|
||||
include :terminal, styled: true
|
||||
|
||||
def run
|
||||
set :include_spec, !only if include_spec.nil?
|
||||
set :include_yardoc, !only if include_yardoc.nil?
|
||||
set :include_build, !only if include_build.nil?
|
||||
|
||||
Dir.chdir context_directory
|
||||
|
||||
base_sha = find_base_sha
|
||||
if base_sha.nil?
|
||||
puts "No base SHA. Using local diff.", :bold
|
||||
else
|
||||
puts "Base SHA: #{base_sha}", :bold
|
||||
end
|
||||
|
||||
files = find_changed_files base_sha
|
||||
if files.empty?
|
||||
puts "No files changed.", :bold
|
||||
else
|
||||
puts "Files changed:", :bold
|
||||
files.each { |file| puts " #{file}" }
|
||||
end
|
||||
|
||||
dirs = find_changed_directories files
|
||||
if dirs.empty?
|
||||
puts "No gem directories changed.", :bold
|
||||
else
|
||||
puts "Gem directories changed:", :bold
|
||||
dirs.each { |dir| puts " #{dir}" }
|
||||
end
|
||||
|
||||
dirs.each { |dir| run_in_dir dir }
|
||||
end
|
||||
|
||||
def run_in_dir dir
|
||||
Dir.chdir dir do
|
||||
if include_spec
|
||||
puts
|
||||
puts "Running spec in #{dir}...", :bold
|
||||
exec ["toys", "_nested", "spec"]
|
||||
end
|
||||
if include_yardoc
|
||||
puts
|
||||
puts "Running yardoc in #{dir}...", :bold
|
||||
exec ["toys", "_nested", "yardoc"]
|
||||
end
|
||||
if include_build
|
||||
puts
|
||||
puts "Running build in #{dir}...", :bold
|
||||
exec ["toys", "_nested", "build"]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def generated_dirs
|
||||
@generated_dirs ||= Dir.glob "generated/google-apis-*"
|
||||
end
|
||||
|
||||
def find_base_sha
|
||||
case github_event_name
|
||||
when "pull_request"
|
||||
payload = JSON.load File.read github_event_payload
|
||||
payload["pull_request"]["base"]["sha"]
|
||||
when "push"
|
||||
payload = JSON.load File.read github_event_payload
|
||||
payload["before"]
|
||||
else
|
||||
from_commit
|
||||
end
|
||||
end
|
||||
|
||||
def find_changed_files base_sha
|
||||
if base_sha.nil?
|
||||
capture(["git", "status", "--porcelain"]).split("\n").map { |line| line.split.last }
|
||||
else
|
||||
result = exec(["git", "show", "--no-patch", "--format=%H", base_sha], out: :capture, err: :capture, e: false)
|
||||
if result.error?
|
||||
exec(["git", "fetch", "--depth=1", "origin", base_sha])
|
||||
base_sha = capture(["git", "show", "--no-patch", "--format=%H", base_sha]).strip
|
||||
else
|
||||
base_sha = result.captured_out
|
||||
end
|
||||
capture(["git", "diff", "--name-only", base_sha]).split("\n").map(&:strip)
|
||||
end
|
||||
end
|
||||
|
||||
def find_changed_directories files
|
||||
dirs = Set.new
|
||||
files.each do |file|
|
||||
case file
|
||||
when %r{^generated/google-apis-discovery_v1/}
|
||||
dirs << "generated/google-apis-discovery_v1" << "google-apis-generator"
|
||||
when %r{^(generated/[^/]+)/}
|
||||
dirs << Regexp.last_match[1]
|
||||
when %r{^google-apis-core/}
|
||||
dirs << "google-apis-core" << "generated/google-apis-discovery_v1"
|
||||
when %r{^google-apis-generator/}
|
||||
dirs << "google-apis-generator"
|
||||
end
|
||||
end
|
||||
dirs.to_a.sort
|
||||
end
|
|
@ -0,0 +1,153 @@
|
|||
# Copyright 2022 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
desc "Run standard Google client generation."
|
||||
|
||||
flag :git_remote, "--remote=NAME" do
|
||||
desc "The name of the git remote to use as the pull request head. If omitted, does not open a pull request."
|
||||
end
|
||||
flag :enable_fork, "--fork" do
|
||||
desc "The github user for whom to create/use a fork"
|
||||
end
|
||||
flag :approval_token, "--approval-token" do
|
||||
default ENV["APPROVAL_GITHUB_TOKEN"]
|
||||
desc "GitHub token for adding labels and approving pull requests"
|
||||
end
|
||||
flag :all do
|
||||
desc "Generate all APIs"
|
||||
end
|
||||
flag :clean do
|
||||
desc "Open a PR to clean out old APIs if needed"
|
||||
end
|
||||
|
||||
remaining_args :requested do
|
||||
desc "Requested apis in api:version format"
|
||||
end
|
||||
|
||||
include :bundler, gemfile_path: "#{context_directory}/google-apis-generator/Gemfile"
|
||||
include :exec, e: true
|
||||
include :git_cache
|
||||
include :terminal
|
||||
|
||||
include "yoshi-pr-generator"
|
||||
|
||||
def run
|
||||
require "json"
|
||||
|
||||
yoshi_utils.git_ensure_identity
|
||||
if enable_fork
|
||||
set :git_remote, "pull-request-fork" unless git_remote
|
||||
yoshi_utils.gh_ensure_fork remote: git_remote
|
||||
end
|
||||
|
||||
@timestamp = Time.now.utc.strftime("%Y%m%d-%H%M%S")
|
||||
apis_versions = list_apis_versions
|
||||
apis_versions.each_with_index do |(api, version), index|
|
||||
pr_single_gem api, version, index + 1, apis_versions.size
|
||||
end
|
||||
pr_clean_old_gems if clean
|
||||
end
|
||||
|
||||
def list_apis_versions
|
||||
return requested.map { |request| request.split(":") } unless all
|
||||
path = git_cache.find("https://github.com/googleapis/discovery-artifact-manager.git",
|
||||
path: "discoveries", update: true)
|
||||
apis_versions = Dir.children(path).map do |name|
|
||||
match = /^(\w+)\.(\w+)\.json$/.match name
|
||||
[match[1], match[2]] if match
|
||||
end
|
||||
apis_versions.compact.shuffle
|
||||
end
|
||||
|
||||
def pr_single_gem api, version, index, total
|
||||
branch_name = "gen/#{api}-#{version}-#{@timestamp}"
|
||||
commit_message = "feat: Automated regeneration of #{api} #{version} client"
|
||||
if open_pr_exists? commit_message
|
||||
puts "(#{index}/#{total}) Pull request already exists for google-apis-#{api}_#{version}", :yellow
|
||||
return
|
||||
end
|
||||
approval_message = "Rubber-stamped client auto-generation!"
|
||||
result = yoshi_pr_generator.capture enabled: !git_remote.nil?,
|
||||
remote: git_remote,
|
||||
branch_name: branch_name,
|
||||
commit_message: commit_message,
|
||||
labels: ["automerge"],
|
||||
auto_approve: approval_message,
|
||||
approval_token: approval_token do
|
||||
regen_single_gem api, version
|
||||
end
|
||||
case result
|
||||
when Integer
|
||||
puts "(#{index}/#{total}) Opened pull request #{result} for google-apis-#{api}_#{version}", :green, :bold
|
||||
when :unchanged
|
||||
puts "(#{index}/#{total}) No changes for google-apis-#{api}_#{version}", :magenta
|
||||
else
|
||||
puts "(#{index}/#{total}) Generated google-apis-#{api}_#{version}", :cyan
|
||||
end
|
||||
end
|
||||
|
||||
def pr_clean_old_gems
|
||||
branch_name = "gen/clean-#{@timestamp}"
|
||||
commit_message = "feat: Automated cleanup of obsolete gems"
|
||||
if open_pr_exists? commit_message
|
||||
puts "Pull request already exists for cleaning obsolete gems", :yellow
|
||||
return
|
||||
end
|
||||
approval_message = "Rubber-stamped cleanup of obsolete gems!"
|
||||
result = yoshi_pr_generator.capture enabled: !git_remote.nil?,
|
||||
remote: git_remote,
|
||||
branch_name: branch_name,
|
||||
commit_message: commit_message,
|
||||
labels: ["automerge"],
|
||||
auto_approve: approval_message,
|
||||
approval_token: approval_token do
|
||||
clean_old_gems
|
||||
end
|
||||
case result
|
||||
when Integer
|
||||
puts "Opened pull request #{result} for cleaning obsolete gems", :green, :bold
|
||||
when :unchanged
|
||||
puts "No obsolete gems to clean", :magenta
|
||||
end
|
||||
end
|
||||
|
||||
def open_pr_exists? title
|
||||
content = capture ["gh", "pr", "list", "--search", "\"#{title}\" in:title", "--state=open", "--json=number"]
|
||||
!JSON.parse(content).empty?
|
||||
end
|
||||
|
||||
def regen_single_gem api, version
|
||||
Dir.chdir "#{context_directory}/google-apis-generator" do
|
||||
cmd = [
|
||||
"bin/generate-api", "gen",
|
||||
"#{context_directory}/generated",
|
||||
"--api=#{api}.#{version}",
|
||||
"--spot-check",
|
||||
"--names=#{context_directory}/api_names.yaml",
|
||||
"--names-out=#{context_directory}/api_names_out.yaml"
|
||||
]
|
||||
exec cmd, in: [:string, "a\n"]
|
||||
end
|
||||
end
|
||||
|
||||
def clean_old_gems
|
||||
Dir.chdir "#{context_directory}/google-apis-generator" do
|
||||
cmd = [
|
||||
"bin/generate-api", "gen",
|
||||
"#{context_directory}/generated",
|
||||
"--clean"
|
||||
]
|
||||
exec cmd
|
||||
end
|
||||
end
|
|
@ -1,3 +1,17 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
desc "Run standard Google client generation."
|
||||
|
||||
optional_arg :api, desc: "API name (optional). Generates all APIs if omitted."
|
||||
|
@ -14,7 +28,7 @@ def run
|
|||
"#{context_directory}/generated",
|
||||
"--clean"]
|
||||
when nil
|
||||
p exec ["bin/generate-api", "gen",
|
||||
exec ["bin/generate-api", "gen",
|
||||
"#{context_directory}/generated",
|
||||
"--from-discovery",
|
||||
"--no-preferred-only",
|
||||
|
|
|
@ -0,0 +1,184 @@
|
|||
require "fileutils"
|
||||
require "gems"
|
||||
require "rubygems"
|
||||
|
||||
class Releaser
|
||||
@loaded_env = false
|
||||
|
||||
def self.load_env
|
||||
return if @loaded_env
|
||||
|
||||
if ::ENV["KOKORO_GFILE_DIR"]
|
||||
service_account = "#{::ENV['KOKORO_GFILE_DIR']}/service-account.json"
|
||||
raise "#{service_account} is not a file" unless ::File.file? service_account
|
||||
::ENV["GOOGLE_APPLICATION_CREDENTIALS"] = service_account
|
||||
|
||||
filename = "#{::ENV['KOKORO_GFILE_DIR']}/ruby_env_vars.json"
|
||||
raise "#{filename} is not a file" unless ::File.file? filename
|
||||
env_vars = ::JSON.parse ::File.read filename
|
||||
env_vars.each { |k, v| ::ENV[k] ||= v }
|
||||
end
|
||||
|
||||
if ::ENV["KOKORO_KEYSTORE_DIR"]
|
||||
::ENV["DOCS_CREDENTIALS"] ||= "#{::ENV['KOKORO_KEYSTORE_DIR']}/73713_docuploader_service_account"
|
||||
::ENV["GITHUB_TOKEN"] ||= "#{::ENV['KOKORO_KEYSTORE_DIR']}/73713_yoshi-automation-github-key"
|
||||
end
|
||||
|
||||
@loaded_env = true
|
||||
end
|
||||
|
||||
def self.lookup_current_versions
|
||||
versions = {}
|
||||
lines = `gem search '^google-apis-.*'`.split("\n")
|
||||
lines.each do |line|
|
||||
if line =~ /^(google-apis-\w+) \(([\d.]+)\)/
|
||||
versions[Regexp.last_match[1]] = Regexp.last_match[2]
|
||||
end
|
||||
end
|
||||
raise "Something went wrong getting all current gem versions" if versions.empty?
|
||||
versions
|
||||
end
|
||||
|
||||
def initialize gem_name, gem_dir,
|
||||
rubygems_api_token: nil,
|
||||
docs_staging_bucket: nil,
|
||||
docuploader_credentials: nil,
|
||||
dry_run: false,
|
||||
current_versions: nil
|
||||
@gem_name = gem_name
|
||||
@gem_dir = File.expand_path(gem_dir)
|
||||
@rubygems_api_token = rubygems_api_token || ENV["RUBYGEMS_API_TOKEN"]
|
||||
@docs_staging_bucket = docs_staging_bucket || ENV["STAGING_BUCKET"] || "docs-staging"
|
||||
@docuploader_credentials = docuploader_credentials
|
||||
if @docuploader_credentials.nil? && ENV["KOKORO_KEYSTORE_DIR"]
|
||||
@docuploader_credentials = File.join(ENV["KOKORO_KEYSTORE_DIR"], "73713_docuploader_service_account")
|
||||
end
|
||||
@dry_run = dry_run ? true : false
|
||||
@current_versions = current_versions || {}
|
||||
@bundle_updated = false
|
||||
end
|
||||
|
||||
attr_reader :gem_name
|
||||
attr_reader :gem_dir
|
||||
attr_reader :rubygems_api_token
|
||||
attr_reader :docs_staging_bucket
|
||||
attr_reader :docuploader_credentials
|
||||
|
||||
def dry_run?
|
||||
@dry_run
|
||||
end
|
||||
|
||||
def needs_gem_publish?
|
||||
Gem::Version.new(gem_version) > Gem::Version.new(current_rubygems_version)
|
||||
end
|
||||
|
||||
def publish_gem
|
||||
puts "**** Starting publish_gem for #{gem_name}"
|
||||
Dir.chdir gem_dir do
|
||||
FileUtils.rm_rf "pkg"
|
||||
isolate_bundle do
|
||||
execute "bundle exec rake build"
|
||||
end
|
||||
built_gem_path = "pkg/#{gem_name}-#{gem_version}.gem"
|
||||
raise "Failed to build #{built_gem_path}" unless File.file? built_gem_path
|
||||
if dry_run?
|
||||
puts "**** In dry run mode. Skipping gem publish of #{gem_name}"
|
||||
return
|
||||
end
|
||||
response = gems_client.push File.new built_gem_path
|
||||
puts response
|
||||
raise "Failed to publish gem" unless response.include? "Successfully registered gem:"
|
||||
end
|
||||
end
|
||||
|
||||
def publish_docs
|
||||
puts "**** Starting publish_docs for #{gem_name}"
|
||||
Dir.chdir gem_dir do
|
||||
FileUtils.rm_rf "doc"
|
||||
FileUtils.rm_rf ".yardoc"
|
||||
isolate_bundle do
|
||||
execute "bundle exec rake yard"
|
||||
end
|
||||
Dir.chdir "doc" do
|
||||
execute "python3 -m docuploader create-metadata" \
|
||||
" --name #{gem_name}" \
|
||||
" --distribution-name #{gem_name}" \
|
||||
" --language ruby" \
|
||||
" --version v#{gem_version}"
|
||||
unless docuploader_credentials
|
||||
puts "**** No credentials available. Skipping doc upload of #{gem_name}"
|
||||
return
|
||||
end
|
||||
if dry_run?
|
||||
puts "**** In dry run mode. Skipping doc upload of #{gem_name}"
|
||||
return
|
||||
end
|
||||
execute "python3 -m docuploader upload ." \
|
||||
" --credentials=#{docuploader_credentials}" \
|
||||
" --staging-bucket=#{docs_staging_bucket}" \
|
||||
" --metadata-file=./docs.metadata"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def current_rubygems_version
|
||||
@current_rubygems_version ||= begin
|
||||
@current_versions[gem_name] || gems_client.info(gem_name)["version"]
|
||||
rescue Gems::NotFound
|
||||
"0.0.0"
|
||||
end
|
||||
end
|
||||
|
||||
def gem_version
|
||||
@gem_version ||= begin
|
||||
version_content = File.read version_file_path
|
||||
match = /\s(?:GEM_)?VERSION = "([\d\.]+)"/.match version_content
|
||||
raise "Unable to find version constant in #{version_file_path}" unless match
|
||||
match[1]
|
||||
end
|
||||
end
|
||||
|
||||
def version_file_path
|
||||
@version_file_path ||= begin
|
||||
path = Dir.glob("#{gem_dir}/lib/google/apis/*/version.rb").first ||
|
||||
Dir.glob("#{gem_dir}/lib/google/apis/*/gem_version.rb").first ||
|
||||
Dir.glob("#{gem_dir}/lib/google/apis/version.rb").first
|
||||
raise "Unable to find version file in #{gem_dir}" unless path
|
||||
path
|
||||
end
|
||||
end
|
||||
|
||||
def gems_client
|
||||
@gems_client ||= begin
|
||||
if rubygems_api_token
|
||||
Gems.configure do |config|
|
||||
config.key = rubygems_api_token
|
||||
end
|
||||
puts "Configured rubygems api token of length #{rubygems_api_token.length}"
|
||||
end
|
||||
Gems::Client.new
|
||||
end
|
||||
end
|
||||
|
||||
def isolate_bundle
|
||||
block = proc do
|
||||
execute "bundle update" unless @bundle_updated
|
||||
@bundle_updated = true
|
||||
yield
|
||||
end
|
||||
if defined?(Bundler)
|
||||
if Bundler.respond_to? :with_unbundled_env
|
||||
Bundler.with_unbundled_env(&block)
|
||||
else
|
||||
Bundler.with_clean_env(&block)
|
||||
end
|
||||
else
|
||||
block.call
|
||||
end
|
||||
end
|
||||
|
||||
def execute cmd
|
||||
puts cmd
|
||||
raise "Error executing command" unless system cmd
|
||||
end
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
include :exec, e: true
|
||||
include :gems
|
||||
|
||||
flag :dry_run, default: ::ENV["RELEASE_DRY_RUN"] == "true"
|
||||
|
||||
def run
|
||||
gem "gems", "~> 1.2"
|
||||
require "releaser"
|
||||
Releaser.load_env
|
||||
current_versions = Releaser.lookup_current_versions
|
||||
Dir.glob("generated/google-apis-*") do |gem_dir|
|
||||
gem_name = File.basename gem_dir
|
||||
puts "Checking #{gem_name}..."
|
||||
releaser = Releaser.new gem_name, gem_dir, current_versions: current_versions, dry_run: dry_run
|
||||
if releaser.needs_gem_publish?
|
||||
releaser.publish_gem
|
||||
releaser.publish_docs
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,28 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
include :exec, e: true
|
||||
include :gems
|
||||
|
||||
required_arg :package
|
||||
flag :dry_run, default: ::ENV["RELEASE_DRY_RUN"] == "true"
|
||||
|
||||
def run
|
||||
gem "gems", "~> 1.2"
|
||||
require "releaser"
|
||||
Releaser.load_env
|
||||
releaser = Releaser.new package, package, dry_run: dry_run
|
||||
releaser.publish_gem if releaser.needs_gem_publish?
|
||||
releaser.publish_docs
|
||||
end
|
|
@ -0,0 +1,18 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
load_git remote: "https://github.com/googleapis/ruby-common-tools.git",
|
||||
path: "toys/release"
|
|
@ -0,0 +1,48 @@
|
|||
# Copyright 2021 Google LLC
|
||||
#
|
||||
# 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.
|
||||
|
||||
# Add required env vars here.
|
||||
required_envvars+=(
|
||||
)
|
||||
|
||||
# Add env vars which are passed down into the container here.
|
||||
pass_down_envvars+=(
|
||||
"AUTORELEASE_PR" "RELEASE_DRY_RUN" "PACKAGE" "RELEASE_PACKAGE" "KOKORO_GIT_COMMIT" "RUBY_VERSIONS" "EXTRA_CI_ARGS"
|
||||
)
|
||||
|
||||
# Prevent unintentional override on the default image.
|
||||
if [[ "${TRAMPOLINE_IMAGE_UPLOAD:-false}" == "true" ]] && [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
|
||||
echo "Please set TRAMPOLINE_IMAGE if you want to upload the Docker image."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Define the default value if it makes sense.
|
||||
if [[ -z "${TRAMPOLINE_IMAGE_UPLOAD:-}" ]]; then
|
||||
TRAMPOLINE_IMAGE_UPLOAD=""
|
||||
fi
|
||||
|
||||
if [[ -z "${TRAMPOLINE_IMAGE:-}" ]]; then
|
||||
TRAMPOLINE_IMAGE=""
|
||||
fi
|
||||
|
||||
if [[ -z "${TRAMPOLINE_DOCKERFILE:-}" ]]; then
|
||||
TRAMPOLINE_DOCKERFILE=""
|
||||
fi
|
||||
|
||||
if [[ -z "${TRAMPOLINE_BUILD_FILE:-}" ]]; then
|
||||
TRAMPOLINE_BUILD_FILE=""
|
||||
fi
|
||||
|
||||
# Secret Manager secrets.
|
||||
source ${PROJECT_ROOT}/.kokoro/populate-secrets.sh
|
10
README.md
10
README.md
|
@ -30,11 +30,11 @@ files.items.each do |file|
|
|||
end
|
||||
|
||||
# Upload a file
|
||||
metadata = Google::Apis::DriveV3::File.new(title: 'My document')
|
||||
metadata = drive.insert_file(metadata, upload_source: 'test.txt', content_type: 'text/plain')
|
||||
metadata = Google::Apis::DriveV3::File.new(name: 'test.txt')
|
||||
metadata = drive.create_file(metadata, upload_source: '/tmp/test.txt', content_type: 'text/plain')
|
||||
|
||||
# Download a file
|
||||
drive.get_file(metadata.id, download_dest: '/tmp/myfile.txt')
|
||||
drive.get_file(metadata.id, download_dest: '/tmp/downloaded-test.txt')
|
||||
```
|
||||
|
||||
Following is another example using the Content API (Google Merchant Center), provided by the `google-apis-content_v2` gem:
|
||||
|
@ -57,7 +57,7 @@ content.authorization.fetch_access_token!
|
|||
content.list_datafeeds(merchant_id) # Returns Google::Apis::ContentV2::ListDatafeedsResponse
|
||||
```
|
||||
|
||||
For more detailed information, see the [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md).
|
||||
For more detailed information, see the [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md).
|
||||
|
||||
## Which client should I use?
|
||||
|
||||
|
@ -73,7 +73,7 @@ The documentation for the particular Google service you are working with, may pr
|
|||
|
||||
## Samples
|
||||
|
||||
See the [samples](https://github.com/google/google-api-ruby-client/tree/master/samples) for examples on how to use the client library for various
|
||||
See the [samples](https://github.com/google/google-api-ruby-client/tree/main/samples) for examples on how to use the client library for various
|
||||
services.
|
||||
|
||||
## Supported Ruby versions
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
# Security Policy
|
||||
|
||||
To report a security issue, please use [g.co/vulnz](https://g.co/vulnz).
|
||||
|
||||
The Google Security Team will respond within 5 working days of your report on g.co/vulnz.
|
||||
|
||||
We use g.co/vulnz for our intake, and do coordination and disclosure here using GitHub Security Advisory to privately discuss and fix the issue.
|
46599
api_names_out.yaml
46599
api_names_out.yaml
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "abusiveexperiencereport:v1",
|
||||
"name_pretty": "Abusive Experience Report API",
|
||||
"distribution_name": "google-apis-abusiveexperiencereport_v1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,29 @@
|
|||
# Release history for google-apis-abusiveexperiencereport_v1
|
||||
|
||||
### v0.7.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.6.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.5.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.4.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.3.0 (2021-05-19)
|
||||
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/abusiveexperiencereport_v1"
|
|||
client = Google::Apis::AbusiveexperiencereportV1::AbusiveExperienceReportService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Abusiveexperiencereport service in particular.)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/abusiveexperiencereport_v1/gem_version", __dir__)
|
||||
gem_version = Google::Apis::AbusiveexperiencereportV1::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-abusiveexperiencereport_v1"
|
||||
gem.version = Google::Apis::AbusiveexperiencereportV1::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Abusive Experience Report API V1"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-abusiveexperiencereport_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-abusiveexperiencereport_v1/v#{Google::Apis::AbusiveexperiencereportV1::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-abusiveexperiencereport_v1"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-abusiveexperiencereport_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-abusiveexperiencereport_v1/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-abusiveexperiencereport_v1"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -16,10 +16,10 @@ module Google
|
|||
module Apis
|
||||
module AbusiveexperiencereportV1
|
||||
# Version of the google-apis-abusiveexperiencereport_v1 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.7.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20200803"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "2ac44c2145d111033cf344c624dad4c1d3188f25"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "acceleratedmobilepageurl:v1",
|
||||
"name_pretty": "Accelerated Mobile Pages (AMP) URL API",
|
||||
"distribution_name": "google-apis-acceleratedmobilepageurl_v1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,29 @@
|
|||
# Release history for google-apis-acceleratedmobilepageurl_v1
|
||||
|
||||
### v0.7.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.6.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.5.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.4.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.3.0 (2021-05-19)
|
||||
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/acceleratedmobilepageurl_v1"
|
|||
client = Google::Apis::AcceleratedmobilepageurlV1::AcceleratedmobilepageurlService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Acceleratedmobilepageurl service in particular.)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/acceleratedmobilepageurl_v1/gem_version", __dir__)
|
||||
gem_version = Google::Apis::AcceleratedmobilepageurlV1::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-acceleratedmobilepageurl_v1"
|
||||
gem.version = Google::Apis::AcceleratedmobilepageurlV1::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Accelerated Mobile Pages (AMP) URL API V1"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-acceleratedmobilepageurl_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-acceleratedmobilepageurl_v1/v#{Google::Apis::AcceleratedmobilepageurlV1::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-acceleratedmobilepageurl_v1"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-acceleratedmobilepageurl_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-acceleratedmobilepageurl_v1/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-acceleratedmobilepageurl_v1"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -16,10 +16,10 @@ module Google
|
|||
module Apis
|
||||
module AcceleratedmobilepageurlV1
|
||||
# Version of the google-apis-acceleratedmobilepageurl_v1 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.7.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20200916"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "2ac44c2145d111033cf344c624dad4c1d3188f25"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "accessapproval:v1",
|
||||
"name_pretty": "Access Approval API",
|
||||
"distribution_name": "google-apis-accessapproval_v1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,72 @@
|
|||
# Release history for google-apis-accessapproval_v1
|
||||
|
||||
### v0.17.0 (2022-03-22)
|
||||
|
||||
* Regenerated from discovery document revision 20220317
|
||||
|
||||
### v0.16.0 (2022-03-08)
|
||||
|
||||
* Regenerated from discovery document revision 20220304
|
||||
|
||||
### v0.15.0 (2022-02-15)
|
||||
|
||||
* Regenerated from discovery document revision 20220212
|
||||
* Regenerated using generator version 0.4.1
|
||||
|
||||
### v0.14.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.13.0 (2021-12-02)
|
||||
|
||||
* Regenerated from discovery document revision 20211130
|
||||
|
||||
### v0.12.0 (2021-11-02)
|
||||
|
||||
* Regenerated from discovery document revision 20211029
|
||||
|
||||
### v0.11.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.10.0 (2021-09-10)
|
||||
|
||||
* Regenerated from discovery document revision 20210907
|
||||
|
||||
### v0.9.0 (2021-08-18)
|
||||
|
||||
* Regenerated from discovery document revision 20210813
|
||||
|
||||
### v0.8.0 (2021-08-04)
|
||||
|
||||
* Regenerated from discovery document revision 20210730
|
||||
|
||||
### v0.7.0 (2021-06-30)
|
||||
|
||||
* Regenerated from discovery document revision 20210625
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.6.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.5.0 (2021-05-19)
|
||||
|
||||
* Regenerated from discovery document revision 20210513
|
||||
|
||||
### v0.4.0 (2021-04-28)
|
||||
|
||||
* Regenerated from discovery document revision 20210423
|
||||
|
||||
### v0.3.0 (2021-03-24)
|
||||
|
||||
* Regenerated from discovery document revision 20210318
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/accessapproval_v1"
|
|||
client = Google::Apis::AccessapprovalV1::AccessApprovalService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Accessapproval service in particular.)
|
||||
|
||||
|
@ -79,7 +79,7 @@ Gem names for modern clients are often of the form `google-cloud-<service_name>`
|
|||
|
||||
**For most users, we recommend the modern client, if one is available.** Compared with simple clients, modern clients are generally much easier to use and more Ruby-like, support more advanced features such as streaming and long-running operations, and often provide much better performance. You may consider using a simple client instead, if a modern client is not yet available for the service you want to use, or if you are not able to use gRPC on your infrastructure.
|
||||
|
||||
The [product documentation](https://cloud.google.com/access-approval/docs) may provide guidance regarding the preferred client library to use.
|
||||
The [product documentation](https://cloud.google.com/cloud-provider-access-management/access-approval/docs) may provide guidance regarding the preferred client library to use.
|
||||
|
||||
## Supported Ruby versions
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/accessapproval_v1/gem_version", __dir__)
|
||||
gem_version = Google::Apis::AccessapprovalV1::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-accessapproval_v1"
|
||||
gem.version = Google::Apis::AccessapprovalV1::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Access Approval API V1"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accessapproval_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accessapproval_v1/v#{Google::Apis::AccessapprovalV1::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accessapproval_v1"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-accessapproval_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accessapproval_v1/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-accessapproval_v1"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -23,13 +23,13 @@ module Google
|
|||
#
|
||||
# An API for controlling access to data by Google personnel.
|
||||
#
|
||||
# @see https://cloud.google.com/access-approval/docs
|
||||
# @see https://cloud.google.com/cloud-provider-access-management/access-approval/docs
|
||||
module AccessapprovalV1
|
||||
# Version of the Access Approval API this client connects to.
|
||||
# This is NOT the gem version.
|
||||
VERSION = 'V1'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,15 +22,60 @@ module Google
|
|||
module Apis
|
||||
module AccessapprovalV1
|
||||
|
||||
# Access Approval service account related to a project/folder/organization.
|
||||
class AccessApprovalServiceAccount
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Email address of the service account.
|
||||
# Corresponds to the JSON property `accountEmail`
|
||||
# @return [String]
|
||||
attr_accessor :account_email
|
||||
|
||||
# The resource name of the Access Approval service account. Format is one of: * "
|
||||
# projects/`project`/serviceAccount" * "folders/`folder`/serviceAccount" * "
|
||||
# organizations/`organization`/serviceAccount"
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@account_email = args[:account_email] if args.key?(:account_email)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
end
|
||||
end
|
||||
|
||||
# Settings on a Project/Folder/Organization related to Access Approval.
|
||||
class AccessApprovalSettings
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The asymmetric crypto key version to use for signing approval requests. Empty
|
||||
# active_key_version indicates that a Google-managed key should be used for
|
||||
# signing. This property will be ignored if set by an ancestor of this resource,
|
||||
# and new non-empty values may not be set.
|
||||
# Corresponds to the JSON property `activeKeyVersion`
|
||||
# @return [String]
|
||||
attr_accessor :active_key_version
|
||||
|
||||
# Output only. This field is read only (not settable via
|
||||
# UpdateAccessAccessApprovalSettings method). If the field is true, that
|
||||
# indicates that at least one service is enrolled for Access Approval in one or
|
||||
# more ancestors of the Project or Folder (this field will always be unset for
|
||||
# the organization since organizations do not have ancestors).
|
||||
# UpdateAccessApprovalSettings method). If the field is true, that indicates
|
||||
# that an ancestor of this Project or Folder has set active_key_version (this
|
||||
# field will always be unset for the organization since organizations do not
|
||||
# have ancestors).
|
||||
# Corresponds to the JSON property `ancestorHasActiveKeyVersion`
|
||||
# @return [Boolean]
|
||||
attr_accessor :ancestor_has_active_key_version
|
||||
alias_method :ancestor_has_active_key_version?, :ancestor_has_active_key_version
|
||||
|
||||
# Output only. This field is read only (not settable via
|
||||
# UpdateAccessApprovalSettings method). If the field is true, that indicates
|
||||
# that at least one service is enrolled for Access Approval in one or more
|
||||
# ancestors of the Project or Folder (this field will always be unset for the
|
||||
# organization since organizations do not have ancestors).
|
||||
# Corresponds to the JSON property `enrolledAncestor`
|
||||
# @return [Boolean]
|
||||
attr_accessor :enrolled_ancestor
|
||||
|
@ -49,6 +94,18 @@ module Google
|
|||
# @return [Array<Google::Apis::AccessapprovalV1::EnrolledService>]
|
||||
attr_accessor :enrolled_services
|
||||
|
||||
# Output only. This field is read only (not settable via
|
||||
# UpdateAccessApprovalSettings method). If the field is true, that indicates
|
||||
# that there is some configuration issue with the active_key_version configured
|
||||
# at this level in the resource hierarchy (e.g. it doesn't exist or the Access
|
||||
# Approval service account doesn't have the correct permissions on it, etc.)
|
||||
# This key version is not necessarily the effective key version at this level,
|
||||
# as key versions are inherited top-down.
|
||||
# Corresponds to the JSON property `invalidKeyVersion`
|
||||
# @return [Boolean]
|
||||
attr_accessor :invalid_key_version
|
||||
alias_method :invalid_key_version?, :invalid_key_version
|
||||
|
||||
# The resource name of the settings. Format is one of: * "projects/`project`/
|
||||
# accessApprovalSettings" * "folders/`folder`/accessApprovalSettings" * "
|
||||
# organizations/`organization`/accessApprovalSettings"
|
||||
|
@ -70,8 +127,11 @@ module Google
|
|||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@active_key_version = args[:active_key_version] if args.key?(:active_key_version)
|
||||
@ancestor_has_active_key_version = args[:ancestor_has_active_key_version] if args.key?(:ancestor_has_active_key_version)
|
||||
@enrolled_ancestor = args[:enrolled_ancestor] if args.key?(:enrolled_ancestor)
|
||||
@enrolled_services = args[:enrolled_services] if args.key?(:enrolled_services)
|
||||
@invalid_key_version = args[:invalid_key_version] if args.key?(:invalid_key_version)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@notification_emails = args[:notification_emails] if args.key?(:notification_emails)
|
||||
end
|
||||
|
@ -238,11 +298,22 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :approve_time
|
||||
|
||||
# True when the request has been auto-approved.
|
||||
# Corresponds to the JSON property `autoApproved`
|
||||
# @return [Boolean]
|
||||
attr_accessor :auto_approved
|
||||
alias_method :auto_approved?, :auto_approved
|
||||
|
||||
# The time at which the approval expires.
|
||||
# Corresponds to the JSON property `expireTime`
|
||||
# @return [String]
|
||||
attr_accessor :expire_time
|
||||
|
||||
# Information about the digital signature of the resource.
|
||||
# Corresponds to the JSON property `signatureInfo`
|
||||
# @return [Google::Apis::AccessapprovalV1::SignatureInfo]
|
||||
attr_accessor :signature_info
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
@ -250,7 +321,9 @@ module Google
|
|||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@approve_time = args[:approve_time] if args.key?(:approve_time)
|
||||
@auto_approved = args[:auto_approved] if args.key?(:auto_approved)
|
||||
@expire_time = args[:expire_time] if args.key?(:expire_time)
|
||||
@signature_info = args[:signature_info] if args.key?(:signature_info)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -276,7 +349,7 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :dismiss_time
|
||||
|
||||
# This field will be true if the ApprovalRequest was implcitly dismissed due to
|
||||
# This field will be true if the ApprovalRequest was implicitly dismissed due to
|
||||
# inaction by the access approval approvers (the request is not acted on by the
|
||||
# approvers before the exiration time).
|
||||
# Corresponds to the JSON property `implicit`
|
||||
|
@ -298,8 +371,7 @@ module Google
|
|||
# A generic empty message that you can re-use to avoid defining duplicated empty
|
||||
# messages in your APIs. A typical example is to use it as the request or the
|
||||
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
||||
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
||||
# `Empty` is empty JSON object ````.
|
||||
# protobuf.Empty) returns (google.protobuf.Empty); `
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -317,19 +389,24 @@ module Google
|
|||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The product for which Access Approval will be enrolled. Allowed values are
|
||||
# listed below (case-sensitive): * all * App Engine * BigQuery * Cloud Bigtable *
|
||||
# Cloud Key Management Service * Compute Engine * Cloud Dataflow * Cloud
|
||||
# Identity and Access Management * Cloud Pub/Sub * Cloud Storage * Persistent
|
||||
# Disk Note: These values are supported as input for legacy purposes, but will
|
||||
# not be returned from the API. * all * appengine.googleapis.com * bigquery.
|
||||
# googleapis.com * bigtable.googleapis.com * cloudkms.googleapis.com * compute.
|
||||
# googleapis.com * dataflow.googleapis.com * iam.googleapis.com * pubsub.
|
||||
# googleapis.com * storage.googleapis.com Calls to UpdateAccessApprovalSettings
|
||||
# using 'all' or any of the XXX.googleapis.com will be translated to the
|
||||
# associated product name ('all', 'App Engine', etc.). Note: 'all' will enroll
|
||||
# the resource in all products supported at both 'GA' and 'Preview' levels. More
|
||||
# information about levels of support is available at https://cloud.google.com/
|
||||
# access-approval/docs/supported-services
|
||||
# listed below (case-sensitive): * all * GA * App Engine * BigQuery * Cloud
|
||||
# Bigtable * Cloud Key Management Service * Compute Engine * Cloud Dataflow *
|
||||
# Cloud DLP * Cloud EKM * Cloud HSM * Cloud Identity and Access Management *
|
||||
# Cloud Logging * Cloud Pub/Sub * Cloud Spanner * Cloud SQL * Cloud Storage *
|
||||
# Google Kubernetes Engine * Organization Policy Serivice * Persistent Disk *
|
||||
# Resource Manager * Speaker ID Note: These values are supported as input for
|
||||
# legacy purposes, but will not be returned from the API. * all * ga-only *
|
||||
# appengine.googleapis.com * bigquery.googleapis.com * bigtable.googleapis.com *
|
||||
# container.googleapis.com * cloudkms.googleapis.com * cloudresourcemanager.
|
||||
# googleapis.com * cloudsql.googleapis.com * compute.googleapis.com * dataflow.
|
||||
# googleapis.com * dlp.googleapis.com * iam.googleapis.com * logging.googleapis.
|
||||
# com * orgpolicy.googleapis.com * pubsub.googleapis.com * spanner.googleapis.
|
||||
# com * speakerid.googleapis.com * storage.googleapis.com Calls to
|
||||
# UpdateAccessApprovalSettings using 'all' or any of the XXX.googleapis.com will
|
||||
# be translated to the associated product name ('all', 'App Engine', etc.). Note:
|
||||
# 'all' will enroll the resource in all products supported at both 'GA' and '
|
||||
# Preview' levels. More information about levels of support is available at
|
||||
# https://cloud.google.com/access-approval/docs/supported-services
|
||||
# Corresponds to the JSON property `cloudProduct`
|
||||
# @return [String]
|
||||
attr_accessor :cloud_product
|
||||
|
@ -395,6 +472,40 @@ module Google
|
|||
@excludes_descendants = args[:excludes_descendants] if args.key?(:excludes_descendants)
|
||||
end
|
||||
end
|
||||
|
||||
# Information about the digital signature of the resource.
|
||||
class SignatureInfo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The resource name of the customer CryptoKeyVersion used for signing.
|
||||
# Corresponds to the JSON property `customerKmsKeyVersion`
|
||||
# @return [String]
|
||||
attr_accessor :customer_kms_key_version
|
||||
|
||||
# The public key for the Google default signing, encoded in PEM format. The
|
||||
# signature was created using a private key which may be verified using this
|
||||
# public key.
|
||||
# Corresponds to the JSON property `googlePublicKeyPem`
|
||||
# @return [String]
|
||||
attr_accessor :google_public_key_pem
|
||||
|
||||
# The digital signature.
|
||||
# Corresponds to the JSON property `signature`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :signature
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@customer_kms_key_version = args[:customer_kms_key_version] if args.key?(:customer_kms_key_version)
|
||||
@google_public_key_pem = args[:google_public_key_pem] if args.key?(:google_public_key_pem)
|
||||
@signature = args[:signature] if args.key?(:signature)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -16,13 +16,13 @@ module Google
|
|||
module Apis
|
||||
module AccessapprovalV1
|
||||
# Version of the google-apis-accessapproval_v1 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.17.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.1"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20201030"
|
||||
REVISION = "20220317"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,12 @@ module Google
|
|||
module Apis
|
||||
module AccessapprovalV1
|
||||
|
||||
class AccessApprovalServiceAccount
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessApprovalSettings
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -94,12 +100,29 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SignatureInfo
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessApprovalServiceAccount
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :account_email, as: 'accountEmail'
|
||||
property :name, as: 'name'
|
||||
end
|
||||
end
|
||||
|
||||
class AccessApprovalSettings
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :active_key_version, as: 'activeKeyVersion'
|
||||
property :ancestor_has_active_key_version, as: 'ancestorHasActiveKeyVersion'
|
||||
property :enrolled_ancestor, as: 'enrolledAncestor'
|
||||
collection :enrolled_services, as: 'enrolledServices', class: Google::Apis::AccessapprovalV1::EnrolledService, decorator: Google::Apis::AccessapprovalV1::EnrolledService::Representation
|
||||
|
||||
property :invalid_key_version, as: 'invalidKeyVersion'
|
||||
property :name, as: 'name'
|
||||
collection :notification_emails, as: 'notificationEmails'
|
||||
end
|
||||
|
@ -152,7 +175,10 @@ module Google
|
|||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :approve_time, as: 'approveTime'
|
||||
property :auto_approved, as: 'autoApproved'
|
||||
property :expire_time, as: 'expireTime'
|
||||
property :signature_info, as: 'signatureInfo', class: Google::Apis::AccessapprovalV1::SignatureInfo, decorator: Google::Apis::AccessapprovalV1::SignatureInfo::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -199,6 +225,15 @@ module Google
|
|||
property :excludes_descendants, as: 'excludesDescendants'
|
||||
end
|
||||
end
|
||||
|
||||
class SignatureInfo
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :customer_kms_key_version, as: 'customerKmsKeyVersion'
|
||||
property :google_public_key_pem, as: 'googlePublicKeyPem'
|
||||
property :signature, :base64 => true, as: 'signature'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -30,7 +30,7 @@ module Google
|
|||
# Accessapproval = Google::Apis::AccessapprovalV1 # Alias the module
|
||||
# service = Accessapproval::AccessApprovalService.new
|
||||
#
|
||||
# @see https://cloud.google.com/access-approval/docs
|
||||
# @see https://cloud.google.com/cloud-provider-access-management/access-approval/docs
|
||||
class AccessApprovalService < Google::Apis::Core::BaseService
|
||||
# @return [String]
|
||||
# API key. Your API key identifies your project and provides you with API access,
|
||||
|
@ -85,7 +85,8 @@ module Google
|
|||
|
||||
# Gets the settings associated with a project, folder, or organization.
|
||||
# @param [String] name
|
||||
# Name of the AccessApprovalSettings to retrieve.
|
||||
# The name of the AccessApprovalSettings to retrieve. Format: "`projects|folders|
|
||||
# organizations`/`id`/accessApprovalSettings"
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
|
@ -113,6 +114,37 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the service account that is used by Access Approval to access KMS
|
||||
# keys for signing approved approval requests.
|
||||
# @param [String] name
|
||||
# Name of the AccessApprovalServiceAccount to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_folder_service_account(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount::Representation
|
||||
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the settings associated with a project, folder, or organization.
|
||||
# Settings to update are determined by the value of field_mask.
|
||||
# @param [String] name
|
||||
|
@ -232,7 +264,8 @@ module Google
|
|||
|
||||
# Gets an approval request. Returns NOT_FOUND if the request does not exist.
|
||||
# @param [String] name
|
||||
# Name of the approval request to retrieve.
|
||||
# The name of the approval request to retrieve. Format: "`projects|folders|
|
||||
# organizations`/`id`/approvalRequests/`approval_request`"
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
|
@ -271,7 +304,7 @@ module Google
|
|||
# following values: * [not set]: Requests that are pending or have active
|
||||
# approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE:
|
||||
# Only active (i.e. currently approved) requests. * DISMISSED: Only requests
|
||||
# that have been dismissed, or requests that . are not approved and past
|
||||
# that have been dismissed, or requests that are not approved and past
|
||||
# expiration. * EXPIRED: Only requests that have been approved, and the approval
|
||||
# has expired. * HISTORY: Active, dismissed and expired requests.
|
||||
# @param [Fixnum] page_size
|
||||
|
@ -344,7 +377,8 @@ module Google
|
|||
|
||||
# Gets the settings associated with a project, folder, or organization.
|
||||
# @param [String] name
|
||||
# Name of the AccessApprovalSettings to retrieve.
|
||||
# The name of the AccessApprovalSettings to retrieve. Format: "`projects|folders|
|
||||
# organizations`/`id`/accessApprovalSettings"
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
|
@ -372,6 +406,37 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the service account that is used by Access Approval to access KMS
|
||||
# keys for signing approved approval requests.
|
||||
# @param [String] name
|
||||
# Name of the AccessApprovalServiceAccount to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_organization_service_account(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount::Representation
|
||||
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the settings associated with a project, folder, or organization.
|
||||
# Settings to update are determined by the value of field_mask.
|
||||
# @param [String] name
|
||||
|
@ -491,7 +556,8 @@ module Google
|
|||
|
||||
# Gets an approval request. Returns NOT_FOUND if the request does not exist.
|
||||
# @param [String] name
|
||||
# Name of the approval request to retrieve.
|
||||
# The name of the approval request to retrieve. Format: "`projects|folders|
|
||||
# organizations`/`id`/approvalRequests/`approval_request`"
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
|
@ -530,7 +596,7 @@ module Google
|
|||
# following values: * [not set]: Requests that are pending or have active
|
||||
# approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE:
|
||||
# Only active (i.e. currently approved) requests. * DISMISSED: Only requests
|
||||
# that have been dismissed, or requests that . are not approved and past
|
||||
# that have been dismissed, or requests that are not approved and past
|
||||
# expiration. * EXPIRED: Only requests that have been approved, and the approval
|
||||
# has expired. * HISTORY: Active, dismissed and expired requests.
|
||||
# @param [Fixnum] page_size
|
||||
|
@ -603,7 +669,8 @@ module Google
|
|||
|
||||
# Gets the settings associated with a project, folder, or organization.
|
||||
# @param [String] name
|
||||
# Name of the AccessApprovalSettings to retrieve.
|
||||
# The name of the AccessApprovalSettings to retrieve. Format: "`projects|folders|
|
||||
# organizations`/`id`/accessApprovalSettings"
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
|
@ -631,6 +698,37 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Retrieves the service account that is used by Access Approval to access KMS
|
||||
# keys for signing approved approval requests.
|
||||
# @param [String] name
|
||||
# Name of the AccessApprovalServiceAccount to retrieve.
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_project_service_account(name, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:get, 'v1/{+name}', options)
|
||||
command.response_representation = Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount::Representation
|
||||
command.response_class = Google::Apis::AccessapprovalV1::AccessApprovalServiceAccount
|
||||
command.params['name'] = name unless name.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Updates the settings associated with a project, folder, or organization.
|
||||
# Settings to update are determined by the value of field_mask.
|
||||
# @param [String] name
|
||||
|
@ -750,7 +848,8 @@ module Google
|
|||
|
||||
# Gets an approval request. Returns NOT_FOUND if the request does not exist.
|
||||
# @param [String] name
|
||||
# Name of the approval request to retrieve.
|
||||
# The name of the approval request to retrieve. Format: "`projects|folders|
|
||||
# organizations`/`id`/approvalRequests/`approval_request`"
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
|
@ -789,7 +888,7 @@ module Google
|
|||
# following values: * [not set]: Requests that are pending or have active
|
||||
# approvals. * ALL: All requests. * PENDING: Only pending requests. * ACTIVE:
|
||||
# Only active (i.e. currently approved) requests. * DISMISSED: Only requests
|
||||
# that have been dismissed, or requests that . are not approved and past
|
||||
# that have been dismissed, or requests that are not approved and past
|
||||
# expiration. * EXPIRED: Only requests that have been approved, and the approval
|
||||
# has expired. * HISTORY: Active, dismissed and expired requests.
|
||||
# @param [Fixnum] page_size
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "0ba45b6d22f2eced00e873b91fc685285919d4ff"
|
||||
"sha": "2ac44c2145d111033cf344c624dad4c1d3188f25"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "accesscontextmanager:v1",
|
||||
"name_pretty": "Access Context Manager API",
|
||||
"distribution_name": "google-apis-accesscontextmanager_v1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,51 @@
|
|||
# Release history for google-apis-accesscontextmanager_v1
|
||||
|
||||
### v0.12.0 (2022-03-24)
|
||||
|
||||
* Regenerated from discovery document revision 20220318
|
||||
* Regenerated using generator version 0.4.1
|
||||
|
||||
### v0.11.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.10.0 (2021-12-10)
|
||||
|
||||
* Regenerated from discovery document revision 20211203
|
||||
|
||||
### v0.9.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.8.0 (2021-09-01)
|
||||
|
||||
* Regenerated from discovery document revision 20210814
|
||||
|
||||
### v0.7.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.6.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.5.0 (2021-05-19)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.4.0 (2021-04-20)
|
||||
|
||||
* Regenerated from discovery document revision 20210412
|
||||
|
||||
### v0.3.0 (2021-03-26)
|
||||
|
||||
* Regenerated from discovery document revision 20210319
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/accesscontextmanager_v1"
|
|||
client = Google::Apis::AccesscontextmanagerV1::AccessContextManagerService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Accesscontextmanager service in particular.)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/accesscontextmanager_v1/gem_version", __dir__)
|
||||
gem_version = Google::Apis::AccesscontextmanagerV1::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-accesscontextmanager_v1"
|
||||
gem.version = Google::Apis::AccesscontextmanagerV1::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Access Context Manager API V1"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accesscontextmanager_v1/v#{Google::Apis::AccesscontextmanagerV1::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-accesscontextmanager_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accesscontextmanager_v1/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-accesscontextmanager_v1"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -29,7 +29,7 @@ module Google
|
|||
# This is NOT the gem version.
|
||||
VERSION = 'V1'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,19 @@ module Google
|
|||
module Apis
|
||||
module AccesscontextmanagerV1
|
||||
|
||||
# Metadata of Access Context Manager's Long Running Operations.
|
||||
class AccessContextManagerOperationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# An `AccessLevel` is a label that can be applied to requests to Google Cloud
|
||||
# services, along with a list of requirements necessary for the label to be
|
||||
# applied.
|
||||
|
@ -47,8 +60,8 @@ module Google
|
|||
|
||||
# Required. Resource name for the Access Level. The `short_name` component must
|
||||
# begin with a letter and only include alphanumeric and '_'. Format: `
|
||||
# accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length of
|
||||
# the `short_name` component is 50 characters.
|
||||
# accessPolicies/`access_policy`/accessLevels/`access_level``. The maximum
|
||||
# length of the `access_level` component is 50 characters.
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
@ -89,7 +102,7 @@ module Google
|
|||
attr_accessor :etag
|
||||
|
||||
# Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/`
|
||||
# policy_id``
|
||||
# access_policy``
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
@ -100,6 +113,21 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :parent
|
||||
|
||||
# The scopes of a policy define which resources an ACM policy can restrict, and
|
||||
# where ACM resources can be referenced. For example, a policy with scopes=["
|
||||
# folders/123"] has the following behavior: - vpcsc perimeters can only restrict
|
||||
# projects within folders/123 - access levels can only be referenced by
|
||||
# resources within folders/123. If empty, there are no limitations on which
|
||||
# resources can be restricted by an ACM policy, and there are no limitations on
|
||||
# where ACM resources can be referenced. Only one policy can include a given
|
||||
# scope (attempting to create a second policy which includes "folders/123" will
|
||||
# result in an error). Currently, scopes cannot be modified after a policy is
|
||||
# created. Currently, policies can only have a single scope. Format: list of `
|
||||
# folders/`folder_number`` or `projects/`project_number``
|
||||
# Corresponds to the JSON property `scopes`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :scopes
|
||||
|
||||
# Required. Human readable title. Does not affect behavior.
|
||||
# Corresponds to the JSON property `title`
|
||||
# @return [String]
|
||||
|
@ -114,6 +142,7 @@ module Google
|
|||
@etag = args[:etag] if args.key?(:etag)
|
||||
@name = args[:name] if args.key?(:name)
|
||||
@parent = args[:parent] if args.key?(:parent)
|
||||
@scopes = args[:scopes] if args.key?(:scopes)
|
||||
@title = args[:title] if args.key?(:title)
|
||||
end
|
||||
end
|
||||
|
@ -148,6 +177,77 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Specifies the audit configuration for a service. The configuration determines
|
||||
# which permission types are logged, and what identities, if any, are exempted
|
||||
# from logging. An AuditConfig must have one or more AuditLogConfigs. If there
|
||||
# are AuditConfigs for both `allServices` and a specific service, the union of
|
||||
# the two AuditConfigs is used for that service: the log_types specified in each
|
||||
# AuditConfig are enabled, and the exempted_members in each AuditLogConfig are
|
||||
# exempted. Example Policy with multiple AuditConfigs: ` "audit_configs": [ ` "
|
||||
# service": "allServices", "audit_log_configs": [ ` "log_type": "DATA_READ", "
|
||||
# exempted_members": [ "user:jose@example.com" ] `, ` "log_type": "DATA_WRITE" `,
|
||||
# ` "log_type": "ADMIN_READ" ` ] `, ` "service": "sampleservice.googleapis.com",
|
||||
# "audit_log_configs": [ ` "log_type": "DATA_READ" `, ` "log_type": "DATA_WRITE"
|
||||
# , "exempted_members": [ "user:aliya@example.com" ] ` ] ` ] ` For sampleservice,
|
||||
# this policy enables DATA_READ, DATA_WRITE and ADMIN_READ logging. It also
|
||||
# exempts jose@example.com from DATA_READ logging, and aliya@example.com from
|
||||
# DATA_WRITE logging.
|
||||
class AuditConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The configuration for logging of each type of permission.
|
||||
# Corresponds to the JSON property `auditLogConfigs`
|
||||
# @return [Array<Google::Apis::AccesscontextmanagerV1::AuditLogConfig>]
|
||||
attr_accessor :audit_log_configs
|
||||
|
||||
# Specifies a service that will be enabled for audit logging. For example, `
|
||||
# storage.googleapis.com`, `cloudsql.googleapis.com`. `allServices` is a special
|
||||
# value that covers all services.
|
||||
# Corresponds to the JSON property `service`
|
||||
# @return [String]
|
||||
attr_accessor :service
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_log_configs = args[:audit_log_configs] if args.key?(:audit_log_configs)
|
||||
@service = args[:service] if args.key?(:service)
|
||||
end
|
||||
end
|
||||
|
||||
# Provides the configuration for logging a type of permissions. Example: ` "
|
||||
# audit_log_configs": [ ` "log_type": "DATA_READ", "exempted_members": [ "user:
|
||||
# jose@example.com" ] `, ` "log_type": "DATA_WRITE" ` ] ` This enables '
|
||||
# DATA_READ' and 'DATA_WRITE' logging, while exempting jose@example.com from
|
||||
# DATA_READ logging.
|
||||
class AuditLogConfig
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies the identities that do not cause logging for this type of permission.
|
||||
# Follows the same format of Binding.members.
|
||||
# Corresponds to the JSON property `exemptedMembers`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :exempted_members
|
||||
|
||||
# The log type that this config enables.
|
||||
# Corresponds to the JSON property `logType`
|
||||
# @return [String]
|
||||
attr_accessor :log_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@exempted_members = args[:exempted_members] if args.key?(:exempted_members)
|
||||
@log_type = args[:log_type] if args.key?(:log_type)
|
||||
end
|
||||
end
|
||||
|
||||
# `BasicLevel` is an `AccessLevel` using a set of recommended features.
|
||||
class BasicLevel
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -177,6 +277,77 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Associates `members`, or principals, with a `role`.
|
||||
class Binding
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Represents a textual expression in the Common Expression Language (CEL) syntax.
|
||||
# CEL is a C-like expression language. The syntax and semantics of CEL are
|
||||
# documented at https://github.com/google/cel-spec. Example (Comparison): title:
|
||||
# "Summary size limit" description: "Determines if a summary is less than 100
|
||||
# chars" expression: "document.summary.size() < 100" Example (Equality): title: "
|
||||
# Requestor is owner" description: "Determines if requestor is the document
|
||||
# owner" expression: "document.owner == request.auth.claims.email" Example (
|
||||
# Logic): title: "Public documents" description: "Determine whether the document
|
||||
# should be publicly visible" expression: "document.type != 'private' &&
|
||||
# document.type != 'internal'" Example (Data Manipulation): title: "Notification
|
||||
# string" description: "Create a notification string with a timestamp."
|
||||
# expression: "'New message received at ' + string(document.create_time)" The
|
||||
# exact variables and functions that may be referenced within an expression are
|
||||
# determined by the service that evaluates it. See the service documentation for
|
||||
# additional information.
|
||||
# Corresponds to the JSON property `condition`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::Expr]
|
||||
attr_accessor :condition
|
||||
|
||||
# Specifies the principals requesting access for a Cloud Platform resource. `
|
||||
# members` can have the following values: * `allUsers`: A special identifier
|
||||
# that represents anyone who is on the internet; with or without a Google
|
||||
# account. * `allAuthenticatedUsers`: A special identifier that represents
|
||||
# anyone who is authenticated with a Google account or a service account. * `
|
||||
# user:`emailid``: An email address that represents a specific Google account.
|
||||
# For example, `alice@example.com` . * `serviceAccount:`emailid``: An email
|
||||
# address that represents a service account. For example, `my-other-app@appspot.
|
||||
# gserviceaccount.com`. * `group:`emailid``: An email address that represents a
|
||||
# Google group. For example, `admins@example.com`. * `deleted:user:`emailid`?uid=
|
||||
# `uniqueid``: An email address (plus unique identifier) representing a user
|
||||
# that has been recently deleted. For example, `alice@example.com?uid=
|
||||
# 123456789012345678901`. If the user is recovered, this value reverts to `user:`
|
||||
# emailid`` and the recovered user retains the role in the binding. * `deleted:
|
||||
# serviceAccount:`emailid`?uid=`uniqueid``: An email address (plus unique
|
||||
# identifier) representing a service account that has been recently deleted. For
|
||||
# example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`.
|
||||
# If the service account is undeleted, this value reverts to `serviceAccount:`
|
||||
# emailid`` and the undeleted service account retains the role in the binding. *
|
||||
# `deleted:group:`emailid`?uid=`uniqueid``: An email address (plus unique
|
||||
# identifier) representing a Google group that has been recently deleted. For
|
||||
# example, `admins@example.com?uid=123456789012345678901`. If the group is
|
||||
# recovered, this value reverts to `group:`emailid`` and the recovered group
|
||||
# retains the role in the binding. * `domain:`domain``: The G Suite domain (
|
||||
# primary) that represents all the users of that domain. For example, `google.
|
||||
# com` or `example.com`.
|
||||
# Corresponds to the JSON property `members`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :members
|
||||
|
||||
# Role that is assigned to the list of `members`, or principals. For example, `
|
||||
# roles/viewer`, `roles/editor`, or `roles/owner`.
|
||||
# Corresponds to the JSON property `role`
|
||||
# @return [String]
|
||||
attr_accessor :role
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@condition = args[:condition] if args.key?(:condition)
|
||||
@members = args[:members] if args.key?(:members)
|
||||
@role = args[:role] if args.key?(:role)
|
||||
end
|
||||
end
|
||||
|
||||
# The request message for Operations.CancelOperation.
|
||||
class CancelOperationRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -407,9 +578,9 @@ module Google
|
|||
|
||||
# Defines the conditions under which an EgressPolicy matches a request.
|
||||
# Conditions based on information about the source of the request. Note that if
|
||||
# the destination of the request is protected by a ServicePerimeter, then that
|
||||
# ServicePerimeter must have an IngressPolicy which allows access in order for
|
||||
# this request to succeed.
|
||||
# the destination of the request is also protected by a ServicePerimeter, then
|
||||
# that ServicePerimeter must have an IngressPolicy which allows access in order
|
||||
# for this request to succeed.
|
||||
class EgressFrom
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -455,9 +626,9 @@ module Google
|
|||
|
||||
# Defines the conditions under which an EgressPolicy matches a request.
|
||||
# Conditions based on information about the source of the request. Note that if
|
||||
# the destination of the request is protected by a ServicePerimeter, then that
|
||||
# ServicePerimeter must have an IngressPolicy which allows access in order for
|
||||
# this request to succeed.
|
||||
# the destination of the request is also protected by a ServicePerimeter, then
|
||||
# that ServicePerimeter must have an IngressPolicy which allows access in order
|
||||
# for this request to succeed.
|
||||
# Corresponds to the JSON property `egressFrom`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::EgressFrom]
|
||||
attr_accessor :egress_from
|
||||
|
@ -465,8 +636,10 @@ module Google
|
|||
# Defines the conditions under which an EgressPolicy matches a request.
|
||||
# Conditions are based on information about the ApiOperation intended to be
|
||||
# performed on the `resources` specified. Note that if the destination of the
|
||||
# request is protected by a ServicePerimeter, then that ServicePerimeter must
|
||||
# have an IngressPolicy which allows access in order for this request to succeed.
|
||||
# request is also protected by a ServicePerimeter, then that ServicePerimeter
|
||||
# must have an IngressPolicy which allows access in order for this request to
|
||||
# succeed. The request must match `operations` AND `resources` fields in order
|
||||
# to be allowed egress out of the perimeter.
|
||||
# Corresponds to the JSON property `egressTo`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::EgressTo]
|
||||
attr_accessor :egress_to
|
||||
|
@ -485,21 +658,25 @@ module Google
|
|||
# Defines the conditions under which an EgressPolicy matches a request.
|
||||
# Conditions are based on information about the ApiOperation intended to be
|
||||
# performed on the `resources` specified. Note that if the destination of the
|
||||
# request is protected by a ServicePerimeter, then that ServicePerimeter must
|
||||
# have an IngressPolicy which allows access in order for this request to succeed.
|
||||
# request is also protected by a ServicePerimeter, then that ServicePerimeter
|
||||
# must have an IngressPolicy which allows access in order for this request to
|
||||
# succeed. The request must match `operations` AND `resources` fields in order
|
||||
# to be allowed egress out of the perimeter.
|
||||
class EgressTo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of ApiOperations that this egress rule applies to. A request matches if
|
||||
# it contains an operation/service in this list.
|
||||
# A list of ApiOperations allowed to be performed by the sources specified in
|
||||
# the corresponding EgressFrom. A request matches if it uses an operation/
|
||||
# service in this list.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::AccesscontextmanagerV1::ApiOperation>]
|
||||
attr_accessor :operations
|
||||
|
||||
# A list of resources, currently only projects in the form `projects/`, that
|
||||
# match this to stanza. A request matches if it contains a resource in this list.
|
||||
# If `*` is specified for resources, then this EgressTo rule will authorize
|
||||
# access to all resources outside the perimeter.
|
||||
# A list of resources, currently only projects in the form `projects/`, that are
|
||||
# allowed to be accessed by sources defined in the corresponding EgressFrom. A
|
||||
# request matches if it contains a resource in this list. If `*` is specified
|
||||
# for `resources`, then this EgressTo rule will authorize access to all
|
||||
# resources outside the perimeter.
|
||||
# Corresponds to the JSON property `resources`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :resources
|
||||
|
@ -518,8 +695,7 @@ module Google
|
|||
# A generic empty message that you can re-use to avoid defining duplicated empty
|
||||
# messages in your APIs. A typical example is to use it as the request or the
|
||||
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
||||
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
||||
# `Empty` is empty JSON object ````.
|
||||
# protobuf.Empty) returns (google.protobuf.Empty); `
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -629,8 +805,72 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Currently, a completed operation means nothing. In the future, this metadata
|
||||
# and a completed operation may indicate that the binding has taken effect and
|
||||
# is affecting access decisions for all users.
|
||||
class GcpUserAccessBindingOperationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message for `GetIamPolicy` method.
|
||||
class GetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Encapsulates settings provided to GetIamPolicy.
|
||||
# Corresponds to the JSON property `options`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::GetPolicyOptions]
|
||||
attr_accessor :options
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@options = args[:options] if args.key?(:options)
|
||||
end
|
||||
end
|
||||
|
||||
# Encapsulates settings provided to GetIamPolicy.
|
||||
class GetPolicyOptions
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Optional. The maximum policy version that will be used to format the policy.
|
||||
# Valid values are 0, 1, and 3. Requests specifying an invalid value will be
|
||||
# rejected. Requests for policies with any conditional role bindings must
|
||||
# specify version 3. Policies with no conditional role bindings may specify any
|
||||
# valid value or leave the field unset. The policy in the response might use the
|
||||
# policy version that you specified, or it might use a lower policy version. For
|
||||
# example, if you specify version 3, but the policy has no conditional role
|
||||
# bindings, the response uses version 1. To learn which resources support
|
||||
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
||||
# google.com/iam/help/conditions/resource-policies).
|
||||
# Corresponds to the JSON property `requestedPolicyVersion`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :requested_policy_version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@requested_policy_version = args[:requested_policy_version] if args.key?(:requested_policy_version)
|
||||
end
|
||||
end
|
||||
|
||||
# Defines the conditions under which an IngressPolicy matches a request.
|
||||
# Conditions are based on information about the source of the request.
|
||||
# Conditions are based on information about the source of the request. The
|
||||
# request must satisfy what is defined in `sources` AND identity related fields
|
||||
# in order to match.
|
||||
class IngressFrom
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -679,14 +919,17 @@ module Google
|
|||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Defines the conditions under which an IngressPolicy matches a request.
|
||||
# Conditions are based on information about the source of the request.
|
||||
# Conditions are based on information about the source of the request. The
|
||||
# request must satisfy what is defined in `sources` AND identity related fields
|
||||
# in order to match.
|
||||
# Corresponds to the JSON property `ingressFrom`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::IngressFrom]
|
||||
attr_accessor :ingress_from
|
||||
|
||||
# Defines the conditions under which an IngressPolicy matches a request.
|
||||
# Conditions are based on information about the ApiOperation intended to be
|
||||
# performed on the destination of the request.
|
||||
# performed on the target resource of the request. The request must satisfy what
|
||||
# is defined in `operations` AND `resources` in order to match.
|
||||
# Corresponds to the JSON property `ingressTo`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::IngressTo]
|
||||
attr_accessor :ingress_to
|
||||
|
@ -712,7 +955,8 @@ module Google
|
|||
# cause an error. If no AccessLevel names are listed, resources within the
|
||||
# perimeter can only be accessed via Google Cloud calls with request origins
|
||||
# within the perimeter. Example: `accessPolicies/MY_POLICY/accessLevels/MY_LEVEL`
|
||||
# . If `*` is specified, then all IngressSources will be allowed.
|
||||
# . If a single `*` is specified for `access_level`, then all IngressSources
|
||||
# will be allowed.
|
||||
# Corresponds to the JSON property `accessLevel`
|
||||
# @return [String]
|
||||
attr_accessor :access_level
|
||||
|
@ -740,22 +984,21 @@ module Google
|
|||
|
||||
# Defines the conditions under which an IngressPolicy matches a request.
|
||||
# Conditions are based on information about the ApiOperation intended to be
|
||||
# performed on the destination of the request.
|
||||
# performed on the target resource of the request. The request must satisfy what
|
||||
# is defined in `operations` AND `resources` in order to match.
|
||||
class IngressTo
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A list of ApiOperations the sources specified in corresponding IngressFrom are
|
||||
# allowed to perform in this ServicePerimeter.
|
||||
# A list of ApiOperations allowed to be performed by the sources specified in
|
||||
# corresponding IngressFrom in this ServicePerimeter.
|
||||
# Corresponds to the JSON property `operations`
|
||||
# @return [Array<Google::Apis::AccesscontextmanagerV1::ApiOperation>]
|
||||
attr_accessor :operations
|
||||
|
||||
# A list of resources, currently only projects in the form `projects/`,
|
||||
# protected by this ServicePerimeter that are allowed to be accessed by sources
|
||||
# defined in the corresponding IngressFrom. A request matches if it contains a
|
||||
# resource in this list. If `*` is specified for resources, then this IngressTo
|
||||
# rule will authorize access to all resources inside the perimeter, provided
|
||||
# that the request also matches the `operations` field.
|
||||
# defined in the corresponding IngressFrom. If a single `*` is specified, then
|
||||
# access to all resources inside the perimeter are allowed.
|
||||
# Corresponds to the JSON property `resources`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :resources
|
||||
|
@ -1026,6 +1269,101 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# An Identity and Access Management (IAM) policy, which specifies access
|
||||
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
||||
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
||||
# Principals can be user accounts, service accounts, Google groups, and domains (
|
||||
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
||||
# an IAM predefined role or a user-created custom role. For some types of Google
|
||||
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
||||
# logical expression that allows access to a resource only if the expression
|
||||
# evaluates to `true`. A condition can add constraints based on attributes of
|
||||
# the request, the resource, or both. To learn which resources support
|
||||
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
||||
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
||||
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
||||
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
||||
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
||||
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
||||
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
||||
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
||||
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
||||
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
||||
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
||||
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
||||
# access description: Does not grant access after Sep 2020 expression: request.
|
||||
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
||||
# a description of IAM and its features, see the [IAM documentation](https://
|
||||
# cloud.google.com/iam/docs/).
|
||||
class Policy
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# Specifies cloud audit logging configuration for this policy.
|
||||
# Corresponds to the JSON property `auditConfigs`
|
||||
# @return [Array<Google::Apis::AccesscontextmanagerV1::AuditConfig>]
|
||||
attr_accessor :audit_configs
|
||||
|
||||
# Associates a list of `members`, or principals, with a `role`. Optionally, may
|
||||
# specify a `condition` that determines how and when the `bindings` are applied.
|
||||
# Each of the `bindings` must contain at least one principal. The `bindings` in
|
||||
# a `Policy` can refer to up to 1,500 principals; up to 250 of these principals
|
||||
# can be Google groups. Each occurrence of a principal counts towards these
|
||||
# limits. For example, if the `bindings` grant 50 different roles to `user:alice@
|
||||
# example.com`, and not to any other principal, then you can add another 1,450
|
||||
# principals to the `bindings` in the `Policy`.
|
||||
# Corresponds to the JSON property `bindings`
|
||||
# @return [Array<Google::Apis::AccesscontextmanagerV1::Binding>]
|
||||
attr_accessor :bindings
|
||||
|
||||
# `etag` is used for optimistic concurrency control as a way to help prevent
|
||||
# simultaneous updates of a policy from overwriting each other. It is strongly
|
||||
# suggested that systems make use of the `etag` in the read-modify-write cycle
|
||||
# to perform policy updates in order to avoid race conditions: An `etag` is
|
||||
# returned in the response to `getIamPolicy`, and systems are expected to put
|
||||
# that etag in the request to `setIamPolicy` to ensure that their change will be
|
||||
# applied to the same version of the policy. **Important:** If you use IAM
|
||||
# Conditions, you must include the `etag` field whenever you call `setIamPolicy`.
|
||||
# If you omit this field, then IAM allows you to overwrite a version `3` policy
|
||||
# with a version `1` policy, and all of the conditions in the version `3` policy
|
||||
# are lost.
|
||||
# Corresponds to the JSON property `etag`
|
||||
# NOTE: Values are automatically base64 encoded/decoded in the client library.
|
||||
# @return [String]
|
||||
attr_accessor :etag
|
||||
|
||||
# Specifies the format of the policy. Valid values are `0`, `1`, and `3`.
|
||||
# Requests that specify an invalid value are rejected. Any operation that
|
||||
# affects conditional role bindings must specify version `3`. This requirement
|
||||
# applies to the following operations: * Getting a policy that includes a
|
||||
# conditional role binding * Adding a conditional role binding to a policy *
|
||||
# Changing a conditional role binding in a policy * Removing any role binding,
|
||||
# with or without a condition, from a policy that includes conditions **
|
||||
# Important:** If you use IAM Conditions, you must include the `etag` field
|
||||
# whenever you call `setIamPolicy`. If you omit this field, then IAM allows you
|
||||
# to overwrite a version `3` policy with a version `1` policy, and all of the
|
||||
# conditions in the version `3` policy are lost. If a policy does not include
|
||||
# any conditions, operations on that policy may specify any valid version or
|
||||
# leave the field unset. To learn which resources support conditions in their
|
||||
# IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/
|
||||
# conditions/resource-policies).
|
||||
# Corresponds to the JSON property `version`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :version
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@audit_configs = args[:audit_configs] if args.key?(:audit_configs)
|
||||
@bindings = args[:bindings] if args.key?(:bindings)
|
||||
@etag = args[:etag] if args.key?(:etag)
|
||||
@version = args[:version] if args.key?(:version)
|
||||
end
|
||||
end
|
||||
|
||||
# A request to replace all existing Access Levels in an Access Policy with the
|
||||
# Access Levels provided. This is done atomically.
|
||||
class ReplaceAccessLevelsRequest
|
||||
|
@ -1149,7 +1487,7 @@ module Google
|
|||
|
||||
# Required. Resource name for the ServicePerimeter. The `short_name` component
|
||||
# must begin with a letter and only include alphanumeric and '_'. Format: `
|
||||
# accessPolicies/`policy_id`/servicePerimeters/`short_name``
|
||||
# accessPolicies/`access_policy`/servicePerimeters/`service_perimeter``
|
||||
# Corresponds to the JSON property `name`
|
||||
# @return [String]
|
||||
attr_accessor :name
|
||||
|
@ -1273,6 +1611,59 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Request message for `SetIamPolicy` method.
|
||||
class SetIamPolicyRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# An Identity and Access Management (IAM) policy, which specifies access
|
||||
# controls for Google Cloud resources. A `Policy` is a collection of `bindings`.
|
||||
# A `binding` binds one or more `members`, or principals, to a single `role`.
|
||||
# Principals can be user accounts, service accounts, Google groups, and domains (
|
||||
# such as G Suite). A `role` is a named list of permissions; each `role` can be
|
||||
# an IAM predefined role or a user-created custom role. For some types of Google
|
||||
# Cloud resources, a `binding` can also specify a `condition`, which is a
|
||||
# logical expression that allows access to a resource only if the expression
|
||||
# evaluates to `true`. A condition can add constraints based on attributes of
|
||||
# the request, the resource, or both. To learn which resources support
|
||||
# conditions in their IAM policies, see the [IAM documentation](https://cloud.
|
||||
# google.com/iam/help/conditions/resource-policies). **JSON example:** ` "
|
||||
# bindings": [ ` "role": "roles/resourcemanager.organizationAdmin", "members": [
|
||||
# "user:mike@example.com", "group:admins@example.com", "domain:google.com", "
|
||||
# serviceAccount:my-project-id@appspot.gserviceaccount.com" ] `, ` "role": "
|
||||
# roles/resourcemanager.organizationViewer", "members": [ "user:eve@example.com"
|
||||
# ], "condition": ` "title": "expirable access", "description": "Does not grant
|
||||
# access after Sep 2020", "expression": "request.time < timestamp('2020-10-01T00:
|
||||
# 00:00.000Z')", ` ` ], "etag": "BwWWja0YfJA=", "version": 3 ` **YAML example:**
|
||||
# bindings: - members: - user:mike@example.com - group:admins@example.com -
|
||||
# domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com
|
||||
# role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.
|
||||
# com role: roles/resourcemanager.organizationViewer condition: title: expirable
|
||||
# access description: Does not grant access after Sep 2020 expression: request.
|
||||
# time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 For
|
||||
# a description of IAM and its features, see the [IAM documentation](https://
|
||||
# cloud.google.com/iam/docs/).
|
||||
# Corresponds to the JSON property `policy`
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::Policy]
|
||||
attr_accessor :policy
|
||||
|
||||
# OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
|
||||
# the fields in the mask will be modified. If no mask is provided, the following
|
||||
# default mask is used: `paths: "bindings, etag"`
|
||||
# Corresponds to the JSON property `updateMask`
|
||||
# @return [String]
|
||||
attr_accessor :update_mask
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@policy = args[:policy] if args.key?(:policy)
|
||||
@update_mask = args[:update_mask] if args.key?(:update_mask)
|
||||
end
|
||||
end
|
||||
|
||||
# The `Status` type defines a logical error model that is suitable for different
|
||||
# programming environments, including REST APIs and RPC APIs. It is used by [
|
||||
# gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
|
||||
|
@ -1312,6 +1703,46 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Request message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The set of permissions to check for the `resource`. Permissions with wildcards
|
||||
# (such as '*' or 'storage.*') are not allowed. For more information see [IAM
|
||||
# Overview](https://cloud.google.com/iam/docs/overview#permissions).
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# Response message for `TestIamPermissions` method.
|
||||
class TestIamPermissionsResponse
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# A subset of `TestPermissionsRequest.permissions` that the caller is allowed.
|
||||
# Corresponds to the JSON property `permissions`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :permissions
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@permissions = args[:permissions] if args.key?(:permissions)
|
||||
end
|
||||
end
|
||||
|
||||
# Specifies how APIs are allowed to communicate within the Service Perimeter.
|
||||
class VpcAccessibleServices
|
||||
include Google::Apis::Core::Hashable
|
||||
|
|
|
@ -16,13 +16,13 @@ module Google
|
|||
module Apis
|
||||
module AccesscontextmanagerV1
|
||||
# Version of the google-apis-accesscontextmanager_v1 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.12.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.1"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20201210"
|
||||
REVISION = "20220318"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,12 @@ module Google
|
|||
module Apis
|
||||
module AccesscontextmanagerV1
|
||||
|
||||
class AccessContextManagerOperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessLevel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -40,12 +46,30 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class BasicLevel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Binding
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class CancelOperationRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -118,6 +142,24 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GcpUserAccessBindingOperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class GetPolicyOptions
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class IngressFrom
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -190,6 +232,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Policy
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ReplaceAccessLevelsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -226,18 +274,42 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class Status
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class VpcAccessibleServices
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessContextManagerOperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class AccessLevel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -257,6 +329,7 @@ module Google
|
|||
property :etag, as: 'etag'
|
||||
property :name, as: 'name'
|
||||
property :parent, as: 'parent'
|
||||
collection :scopes, as: 'scopes'
|
||||
property :title, as: 'title'
|
||||
end
|
||||
end
|
||||
|
@ -270,6 +343,23 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class AuditConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_log_configs, as: 'auditLogConfigs', class: Google::Apis::AccesscontextmanagerV1::AuditLogConfig, decorator: Google::Apis::AccesscontextmanagerV1::AuditLogConfig::Representation
|
||||
|
||||
property :service, as: 'service'
|
||||
end
|
||||
end
|
||||
|
||||
class AuditLogConfig
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :exempted_members, as: 'exemptedMembers'
|
||||
property :log_type, as: 'logType'
|
||||
end
|
||||
end
|
||||
|
||||
class BasicLevel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -279,6 +369,16 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class Binding
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :condition, as: 'condition', class: Google::Apis::AccesscontextmanagerV1::Expr, decorator: Google::Apis::AccesscontextmanagerV1::Expr::Representation
|
||||
|
||||
collection :members, as: 'members'
|
||||
property :role, as: 'role'
|
||||
end
|
||||
end
|
||||
|
||||
class CancelOperationRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -386,6 +486,27 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class GcpUserAccessBindingOperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class GetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :options, as: 'options', class: Google::Apis::AccesscontextmanagerV1::GetPolicyOptions, decorator: Google::Apis::AccesscontextmanagerV1::GetPolicyOptions::Representation
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
class GetPolicyOptions
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :requested_policy_version, as: 'requestedPolicyVersion'
|
||||
end
|
||||
end
|
||||
|
||||
class IngressFrom
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -497,6 +618,18 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class Policy
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :audit_configs, as: 'auditConfigs', class: Google::Apis::AccesscontextmanagerV1::AuditConfig, decorator: Google::Apis::AccesscontextmanagerV1::AuditConfig::Representation
|
||||
|
||||
collection :bindings, as: 'bindings', class: Google::Apis::AccesscontextmanagerV1::Binding, decorator: Google::Apis::AccesscontextmanagerV1::Binding::Representation
|
||||
|
||||
property :etag, :base64 => true, as: 'etag'
|
||||
property :version, as: 'version'
|
||||
end
|
||||
end
|
||||
|
||||
class ReplaceAccessLevelsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -561,6 +694,15 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class SetIamPolicyRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
property :policy, as: 'policy', class: Google::Apis::AccesscontextmanagerV1::Policy, decorator: Google::Apis::AccesscontextmanagerV1::Policy::Representation
|
||||
|
||||
property :update_mask, as: 'updateMask'
|
||||
end
|
||||
end
|
||||
|
||||
class Status
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -570,6 +712,20 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class TestIamPermissionsResponse
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :permissions, as: 'permissions'
|
||||
end
|
||||
end
|
||||
|
||||
class VpcAccessibleServices
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -49,10 +49,10 @@ module Google
|
|||
@batch_path = 'batch'
|
||||
end
|
||||
|
||||
# Create an `AccessPolicy`. Fails if this organization already has a `
|
||||
# AccessPolicy`. The longrunning Operation will have a successful status once
|
||||
# the `AccessPolicy` has propagated to long-lasting storage. Syntactic and basic
|
||||
# semantic errors will be returned in `metadata` as a BadRequest proto.
|
||||
# Creates an access policy. This method fails if the organization already has an
|
||||
# access policy. The long-running operation has a successful status after the
|
||||
# access policy propagates to long-lasting storage. Syntactic and basic semantic
|
||||
# errors are returned in `metadata` as a BadRequest proto.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::AccessPolicy] access_policy_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
|
@ -82,9 +82,9 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Delete an AccessPolicy by resource name. The longrunning Operation will have a
|
||||
# successful status once the AccessPolicy has been removed from long-lasting
|
||||
# storage.
|
||||
# Deletes an access policy based on the resource name. The long-running
|
||||
# operation has a successful status after the access policy is removed from long-
|
||||
# lasting storage.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the access policy to delete. Format `
|
||||
# accessPolicies/`policy_id``
|
||||
|
@ -115,7 +115,7 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Get an AccessPolicy by name.
|
||||
# Returns an access policy based on the name.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the access policy to get. Format `accessPolicies/`
|
||||
# policy_id``
|
||||
|
@ -146,7 +146,41 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all AccessPolicies under a container.
|
||||
# Gets the IAM policy for the specified Access Context Manager access policy.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being requested. See the
|
||||
# operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::GetIamPolicyRequest] get_iam_policy_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccesscontextmanagerV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def get_access_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:getIamPolicy', options)
|
||||
command.request_representation = Google::Apis::AccesscontextmanagerV1::GetIamPolicyRequest::Representation
|
||||
command.request_object = get_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::AccesscontextmanagerV1::Policy::Representation
|
||||
command.response_class = Google::Apis::AccesscontextmanagerV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Lists all access policies in an organization.
|
||||
# @param [Fixnum] page_size
|
||||
# Number of AccessPolicy instances to include in the list. Default 100.
|
||||
# @param [String] page_token
|
||||
|
@ -184,13 +218,12 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Update an AccessPolicy. The longrunning Operation from this RPC will have a
|
||||
# successful status once the changes to the AccessPolicy have propagated to long-
|
||||
# lasting storage. Syntactic and basic semantic errors will be returned in `
|
||||
# metadata` as a BadRequest proto.
|
||||
# Updates an access policy. The long-running operation from this RPC has a
|
||||
# successful status after the changes to the access policy propagate to long-
|
||||
# lasting storage.
|
||||
# @param [String] name
|
||||
# Output only. Resource name of the `AccessPolicy`. Format: `accessPolicies/`
|
||||
# policy_id``
|
||||
# access_policy``
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::AccessPolicy] access_policy_object
|
||||
# @param [String] update_mask
|
||||
# Required. Mask to control which fields get updated. Must be non-empty.
|
||||
|
@ -224,10 +257,83 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Create an Access Level. The longrunning operation from this RPC will have a
|
||||
# successful status once the Access Level has propagated to long-lasting storage.
|
||||
# Access Levels containing errors will result in an error response for the
|
||||
# first error encountered.
|
||||
# Sets the IAM policy for the specified Access Context Manager access policy.
|
||||
# This method replaces the existing IAM policy on the access policy. The IAM
|
||||
# policy controls the set of users who can perform specific operations on the
|
||||
# Access Context Manager access policy.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy is being specified. See the
|
||||
# operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::SetIamPolicyRequest] set_iam_policy_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccesscontextmanagerV1::Policy] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::Policy]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def set_access_policy_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:setIamPolicy', options)
|
||||
command.request_representation = Google::Apis::AccesscontextmanagerV1::SetIamPolicyRequest::Representation
|
||||
command.request_object = set_iam_policy_request_object
|
||||
command.response_representation = Google::Apis::AccesscontextmanagerV1::Policy::Representation
|
||||
command.response_class = Google::Apis::AccesscontextmanagerV1::Policy
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns the IAM permissions that the caller has on the specified Access
|
||||
# Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or
|
||||
# ServicePerimeter. This method does not support other resources.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested. See the
|
||||
# operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_access_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Creates an access level. The long-running operation from this RPC has a
|
||||
# successful status after the access level propagates to long-lasting storage.
|
||||
# If access levels contain errors, an error response is returned for the first
|
||||
# error encountered.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the access policy which owns this Access Level.
|
||||
# Format: `accessPolicies/`policy_id``
|
||||
|
@ -261,9 +367,9 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Delete an Access Level by resource name. The longrunning operation from this
|
||||
# RPC will have a successful status once the Access Level has been removed from
|
||||
# long-lasting storage.
|
||||
# Deletes an access level based on the resource name. The long-running operation
|
||||
# from this RPC has a successful status after the access level has been removed
|
||||
# from long-lasting storage.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the Access Level. Format: `accessPolicies/`
|
||||
# policy_id`/accessLevels/`access_level_id``
|
||||
|
@ -294,7 +400,7 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Get an Access Level by resource name.
|
||||
# Gets an access level based on the resource name.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the Access Level. Format: `accessPolicies/`
|
||||
# policy_id`/accessLevels/`access_level_id``
|
||||
|
@ -332,7 +438,7 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all Access Levels for an access policy.
|
||||
# Lists all access levels for an access policy.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the access policy to list Access Levels from.
|
||||
# Format: `accessPolicies/`policy_id``
|
||||
|
@ -375,15 +481,15 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Update an Access Level. The longrunning operation from this RPC will have a
|
||||
# successful status once the changes to the Access Level have propagated to long-
|
||||
# lasting storage. Access Levels containing errors will result in an error
|
||||
# response for the first error encountered.
|
||||
# Updates an access level. The long-running operation from this RPC has a
|
||||
# successful status after the changes to the access level propagate to long-
|
||||
# lasting storage. If access levels contain errors, an error response is
|
||||
# returned for the first error encountered.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the Access Level. The `short_name` component must
|
||||
# begin with a letter and only include alphanumeric and '_'. Format: `
|
||||
# accessPolicies/`policy_id`/accessLevels/`short_name``. The maximum length of
|
||||
# the `short_name` component is 50 characters.
|
||||
# accessPolicies/`access_policy`/accessLevels/`access_level``. The maximum
|
||||
# length of the `access_level` component is 50 characters.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::AccessLevel] access_level_object
|
||||
# @param [String] update_mask
|
||||
# Required. Mask to control which fields get updated. Must be non-empty.
|
||||
|
@ -417,14 +523,14 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Replace all existing Access Levels in an Access Policy with the Access Levels
|
||||
# provided. This is done atomically. The longrunning operation from this RPC
|
||||
# will have a successful status once all replacements have propagated to long-
|
||||
# lasting storage. Replacements containing errors will result in an error
|
||||
# response for the first error encountered. Replacement will be cancelled on
|
||||
# error, existing Access Levels will not be affected. Operation.response field
|
||||
# will contain ReplaceAccessLevelsResponse. Removing Access Levels contained in
|
||||
# existing Service Perimeters will result in error.
|
||||
# Replaces all existing access levels in an access policy with the access levels
|
||||
# provided. This is done atomically. The long-running operation from this RPC
|
||||
# has a successful status after all replacements propagate to long-lasting
|
||||
# storage. If the replacement contains errors, an error response is returned for
|
||||
# the first error encountered. Upon error, the replacement is cancelled, and
|
||||
# existing access levels are not affected. The Operation.response field contains
|
||||
# ReplaceAccessLevelsResponse. Removing access levels contained in existing
|
||||
# service perimeters result in an error.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the access policy which owns these Access Levels.
|
||||
# Format: `accessPolicies/`policy_id``
|
||||
|
@ -458,16 +564,52 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Commit the dry-run spec for all the Service Perimeters in an Access Policy. A
|
||||
# commit operation on a Service Perimeter involves copying its `spec` field to
|
||||
# that Service Perimeter's `status` field. Only Service Perimeters with `
|
||||
# use_explicit_dry_run_spec` field set to true are affected by a commit
|
||||
# operation. The longrunning operation from this RPC will have a successful
|
||||
# status once the dry-run specs for all the Service Perimeters have been
|
||||
# committed. If a commit fails, it will cause the longrunning operation to
|
||||
# return an error response and the entire commit operation will be cancelled.
|
||||
# When successful, Operation.response field will contain
|
||||
# CommitServicePerimetersResponse. The `dry_run` and the `spec` fields will be
|
||||
# Returns the IAM permissions that the caller has on the specified Access
|
||||
# Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or
|
||||
# ServicePerimeter. This method does not support other resources.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested. See the
|
||||
# operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_access_level_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Commits the dry-run specification for all the service perimeters in an access
|
||||
# policy. A commit operation on a service perimeter involves copying its `spec`
|
||||
# field to the `status` field of the service perimeter. Only service perimeters
|
||||
# with `use_explicit_dry_run_spec` field set to true are affected by a commit
|
||||
# operation. The long-running operation from this RPC has a successful status
|
||||
# after the dry-run specifications for all the service perimeters have been
|
||||
# committed. If a commit fails, it causes the long-running operation to return
|
||||
# an error response and the entire commit operation is cancelled. When
|
||||
# successful, the Operation.response field contains
|
||||
# CommitServicePerimetersResponse. The `dry_run` and the `spec` fields are
|
||||
# cleared after a successful commit operation.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the parent Access Policy which owns all Service
|
||||
|
@ -503,9 +645,9 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Create a Service Perimeter. The longrunning operation from this RPC will have
|
||||
# a successful status once the Service Perimeter has propagated to long-lasting
|
||||
# storage. Service Perimeters containing errors will result in an error response
|
||||
# Creates a service perimeter. The long-running operation from this RPC has a
|
||||
# successful status after the service perimeter propagates to long-lasting
|
||||
# storage. If a service perimeter contains errors, an error response is returned
|
||||
# for the first error encountered.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the access policy which owns this Service
|
||||
|
@ -540,8 +682,8 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Delete a Service Perimeter by resource name. The longrunning operation from
|
||||
# this RPC will have a successful status once the Service Perimeter has been
|
||||
# Deletes a service perimeter based on the resource name. The long-running
|
||||
# operation from this RPC has a successful status after the service perimeter is
|
||||
# removed from long-lasting storage.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the Service Perimeter. Format: `accessPolicies/`
|
||||
|
@ -573,7 +715,7 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Get a Service Perimeter by resource name.
|
||||
# Gets a service perimeter based on the resource name.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the Service Perimeter. Format: `accessPolicies/`
|
||||
# policy_id`/servicePerimeters/`service_perimeters_id``
|
||||
|
@ -604,7 +746,7 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# List all Service Perimeters for an access policy.
|
||||
# Lists all service perimeters for an access policy.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the access policy to list Service Perimeters from.
|
||||
# Format: `accessPolicies/`policy_id``
|
||||
|
@ -642,14 +784,14 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Update a Service Perimeter. The longrunning operation from this RPC will have
|
||||
# a successful status once the changes to the Service Perimeter have propagated
|
||||
# to long-lasting storage. Service Perimeter containing errors will result in an
|
||||
# error response for the first error encountered.
|
||||
# Updates a service perimeter. The long-running operation from this RPC has a
|
||||
# successful status after the service perimeter propagates to long-lasting
|
||||
# storage. If a service perimeter contains errors, an error response is returned
|
||||
# for the first error encountered.
|
||||
# @param [String] name
|
||||
# Required. Resource name for the ServicePerimeter. The `short_name` component
|
||||
# must begin with a letter and only include alphanumeric and '_'. Format: `
|
||||
# accessPolicies/`policy_id`/servicePerimeters/`short_name``
|
||||
# accessPolicies/`access_policy`/servicePerimeters/`service_perimeter``
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::ServicePerimeter] service_perimeter_object
|
||||
# @param [String] update_mask
|
||||
# Required. Mask to control which fields get updated. Must be non-empty.
|
||||
|
@ -683,13 +825,13 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Replace all existing Service Perimeters in an Access Policy with the Service
|
||||
# Perimeters provided. This is done atomically. The longrunning operation from
|
||||
# this RPC will have a successful status once all replacements have propagated
|
||||
# to long-lasting storage. Replacements containing errors will result in an
|
||||
# error response for the first error encountered. Replacement will be cancelled
|
||||
# on error, existing Service Perimeters will not be affected. Operation.response
|
||||
# field will contain ReplaceServicePerimetersResponse.
|
||||
# Replace all existing service perimeters in an access policy with the service
|
||||
# perimeters provided. This is done atomically. The long-running operation from
|
||||
# this RPC has a successful status after all replacements propagate to long-
|
||||
# lasting storage. Replacements containing errors result in an error response
|
||||
# for the first error encountered. Upon an error, replacement are cancelled and
|
||||
# existing service perimeters are not affected. The Operation.response field
|
||||
# contains ReplaceServicePerimetersResponse.
|
||||
# @param [String] parent
|
||||
# Required. Resource name for the access policy which owns these Service
|
||||
# Perimeters. Format: `accessPolicies/`policy_id``
|
||||
|
@ -723,6 +865,42 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Returns the IAM permissions that the caller has on the specified Access
|
||||
# Context Manager resource. The resource can be an AccessPolicy, AccessLevel, or
|
||||
# ServicePerimeter. This method does not support other resources.
|
||||
# @param [String] resource
|
||||
# REQUIRED: The resource for which the policy detail is being requested. See the
|
||||
# operation documentation for the appropriate value for this field.
|
||||
# @param [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsRequest] test_iam_permissions_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def test_service_perimeter_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v1/{+resource}:testIamPermissions', options)
|
||||
command.request_representation = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsRequest::Representation
|
||||
command.request_object = test_iam_permissions_request_object
|
||||
command.response_representation = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse::Representation
|
||||
command.response_class = Google::Apis::AccesscontextmanagerV1::TestIamPermissionsResponse
|
||||
command.params['resource'] = resource unless resource.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Starts asynchronous cancellation on a long-running operation. The server makes
|
||||
# a best effort to cancel the operation, but success is not guaranteed. If the
|
||||
# server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
|
||||
|
@ -874,7 +1052,7 @@ module Google
|
|||
end
|
||||
|
||||
# Creates a GcpUserAccessBinding. If the client specifies a name, the server
|
||||
# will ignore it. Fails if a resource already exists with the same group_key.
|
||||
# ignores it. Fails if a resource already exists with the same group_key.
|
||||
# Completion of this long-running operation does not necessarily signify that
|
||||
# the new binding is deployed onto all affected users, which may take more time.
|
||||
# @param [String] parent
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "0ca499593af3b5f4ce042458f0fd780add7ad32f"
|
||||
"sha": "2ac44c2145d111033cf344c624dad4c1d3188f25"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "accesscontextmanager:v1beta",
|
||||
"name_pretty": "Access Context Manager API",
|
||||
"distribution_name": "google-apis-accesscontextmanager_v1beta",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,38 @@
|
|||
# Release history for google-apis-accesscontextmanager_v1beta
|
||||
|
||||
### v0.9.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.8.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.7.0 (2021-09-01)
|
||||
|
||||
* Regenerated from discovery document revision 20210814
|
||||
|
||||
### v0.6.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.5.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.4.0 (2021-05-19)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.3.0 (2021-03-26)
|
||||
|
||||
* Regenerated from discovery document revision 20210319
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/accesscontextmanager_v1beta"
|
|||
client = Google::Apis::AccesscontextmanagerV1beta::AccessContextManagerService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Accesscontextmanager service in particular.)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/accesscontextmanager_v1beta/gem_version", __dir__)
|
||||
gem_version = Google::Apis::AccesscontextmanagerV1beta::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-accesscontextmanager_v1beta"
|
||||
gem.version = Google::Apis::AccesscontextmanagerV1beta::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Access Context Manager API V1beta"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1beta/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accesscontextmanager_v1beta/v#{Google::Apis::AccesscontextmanagerV1beta::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-accesscontextmanager_v1beta"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-accesscontextmanager_v1beta/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-accesscontextmanager_v1beta/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-accesscontextmanager_v1beta"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -29,7 +29,7 @@ module Google
|
|||
# This is NOT the gem version.
|
||||
VERSION = 'V1beta'
|
||||
|
||||
# View and manage your data across Google Cloud Platform services
|
||||
# See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account.
|
||||
AUTH_CLOUD_PLATFORM = 'https://www.googleapis.com/auth/cloud-platform'
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,19 @@ module Google
|
|||
module Apis
|
||||
module AccesscontextmanagerV1beta
|
||||
|
||||
# Metadata of Access Context Manager's Long Running Operations.
|
||||
class AccessContextManagerOperationMetadata
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
end
|
||||
end
|
||||
|
||||
# An `AccessLevel` is a label that can be applied to requests to Google Cloud
|
||||
# services, along with a list of requirements necessary for the label to be
|
||||
# applied.
|
||||
|
|
|
@ -16,13 +16,13 @@ module Google
|
|||
module Apis
|
||||
module AccesscontextmanagerV1beta
|
||||
# Version of the google-apis-accesscontextmanager_v1beta gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.9.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20200825"
|
||||
REVISION = "20210814"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -22,6 +22,12 @@ module Google
|
|||
module Apis
|
||||
module AccesscontextmanagerV1beta
|
||||
|
||||
class AccessContextManagerOperationMetadata
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessLevel
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -118,6 +124,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class AccessContextManagerOperationMetadata
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
end
|
||||
end
|
||||
|
||||
class AccessLevel
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "2ac44c2145d111033cf344c624dad4c1d3188f25"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "adexchangebuyer2:v2beta1",
|
||||
"name_pretty": "Ad Exchange Buyer API II",
|
||||
"distribution_name": "google-apis-adexchangebuyer2_v2beta1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,65 @@
|
|||
# Release history for google-apis-adexchangebuyer2_v2beta1
|
||||
|
||||
### v0.15.0 (2022-03-22)
|
||||
|
||||
* Regenerated from discovery document revision 20220321
|
||||
|
||||
### v0.14.0 (2022-03-02)
|
||||
|
||||
* Regenerated from discovery document revision 20220301
|
||||
|
||||
### v0.13.0 (2022-02-03)
|
||||
|
||||
* Regenerated from discovery document revision 20220131
|
||||
* Regenerated using generator version 0.4.1
|
||||
|
||||
### v0.12.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.11.0 (2021-11-02)
|
||||
|
||||
* Regenerated from discovery document revision 20211029
|
||||
|
||||
### v0.10.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.9.0 (2021-09-24)
|
||||
|
||||
* Regenerated from discovery document revision 20210922
|
||||
|
||||
### v0.8.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.7.0 (2021-06-24)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.6.0 (2021-06-15)
|
||||
|
||||
* Regenerated from discovery document revision 20210613
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.5.0 (2021-05-26)
|
||||
|
||||
* Regenerated from discovery document revision 20210525
|
||||
|
||||
### v0.4.0 (2021-05-19)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.3.0 (2021-04-29)
|
||||
|
||||
* Regenerated from discovery document revision 20210428
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated from discovery document revision 20210223
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/adexchangebuyer2_v2beta1"
|
|||
client = Google::Apis::Adexchangebuyer2V2beta1::AdExchangeBuyerIIService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Adexchangebuyer2 service in particular.)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/adexchangebuyer2_v2beta1/gem_version", __dir__)
|
||||
gem_version = Google::Apis::Adexchangebuyer2V2beta1::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-adexchangebuyer2_v2beta1"
|
||||
gem.version = Google::Apis::Adexchangebuyer2V2beta1::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Ad Exchange Buyer API II V2beta1"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexchangebuyer2_v2beta1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-adexchangebuyer2_v2beta1/v#{Google::Apis::Adexchangebuyer2V2beta1::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexchangebuyer2_v2beta1"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-adexchangebuyer2_v2beta1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-adexchangebuyer2_v2beta1/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-adexchangebuyer2_v2beta1"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -32,11 +32,11 @@ module Google
|
|||
# Represents a whole or partial calendar date, such as a birthday. The time of
|
||||
# day and time zone are either specified elsewhere or are insignificant. The
|
||||
# date is relative to the Gregorian Calendar. This can represent one of the
|
||||
# following: * A full date, with non-zero year, month, and day values * A month
|
||||
# and day value, with a zero year, such as an anniversary * A year on its own,
|
||||
# with zero month and day values * A year and month value, with a zero day, such
|
||||
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
||||
# google.protobuf.Timestamp`.
|
||||
# following: * A full date, with non-zero year, month, and day values. * A month
|
||||
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
||||
# with a zero month and a zero day. * A year and month, with a zero day (for
|
||||
# example, a credit card expiration date). Related types: * google.type.
|
||||
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
||||
# Corresponds to the JSON property `endDate`
|
||||
# @return [Google::Apis::Adexchangebuyer2V2beta1::Date]
|
||||
attr_accessor :end_date
|
||||
|
@ -44,11 +44,11 @@ module Google
|
|||
# Represents a whole or partial calendar date, such as a birthday. The time of
|
||||
# day and time zone are either specified elsewhere or are insignificant. The
|
||||
# date is relative to the Gregorian Calendar. This can represent one of the
|
||||
# following: * A full date, with non-zero year, month, and day values * A month
|
||||
# and day value, with a zero year, such as an anniversary * A year on its own,
|
||||
# with zero month and day values * A year and month value, with a zero day, such
|
||||
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
||||
# google.protobuf.Timestamp`.
|
||||
# following: * A full date, with non-zero year, month, and day values. * A month
|
||||
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
||||
# with a zero month and a zero day. * A year and month, with a zero day (for
|
||||
# example, a credit card expiration date). Related types: * google.type.
|
||||
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
||||
# Corresponds to the JSON property `startDate`
|
||||
# @return [Google::Apis::Adexchangebuyer2V2beta1::Date]
|
||||
attr_accessor :start_date
|
||||
|
@ -423,6 +423,7 @@ module Google
|
|||
# Name used to represent this client to publishers. You may have multiple
|
||||
# clients that map to the same entity, but for each client the combination of `
|
||||
# clientName` and entity must be unique. You can specify this field as empty.
|
||||
# Maximum length of 255 characters is allowed.
|
||||
# Corresponds to the JSON property `clientName`
|
||||
# @return [String]
|
||||
attr_accessor :client_name
|
||||
|
@ -1050,11 +1051,11 @@ module Google
|
|||
# Represents a whole or partial calendar date, such as a birthday. The time of
|
||||
# day and time zone are either specified elsewhere or are insignificant. The
|
||||
# date is relative to the Gregorian Calendar. This can represent one of the
|
||||
# following: * A full date, with non-zero year, month, and day values * A month
|
||||
# and day value, with a zero year, such as an anniversary * A year on its own,
|
||||
# with zero month and day values * A year and month value, with a zero day, such
|
||||
# as a credit card expiration date Related types are google.type.TimeOfDay and `
|
||||
# google.protobuf.Timestamp`.
|
||||
# following: * A full date, with non-zero year, month, and day values. * A month
|
||||
# and day, with a zero year (for example, an anniversary). * A year on its own,
|
||||
# with a zero month and a zero day. * A year and month, with a zero day (for
|
||||
# example, a credit card expiration date). Related types: * google.type.
|
||||
# TimeOfDay * google.type.DateTime * google.protobuf.Timestamp
|
||||
class Date
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -1443,8 +1444,7 @@ module Google
|
|||
# @return [Google::Apis::Adexchangebuyer2V2beta1::NonGuaranteedAuctionTerms]
|
||||
attr_accessor :non_guaranteed_auction_terms
|
||||
|
||||
# Terms for Preferred Deals. Note that Preferred Deals cannot be created via the
|
||||
# API at this time, but can be returned in a get or list request.
|
||||
# Terms for Preferred Deals.
|
||||
# Corresponds to the JSON property `nonGuaranteedFixedPriceTerms`
|
||||
# @return [Google::Apis::Adexchangebuyer2V2beta1::NonGuaranteedFixedPriceTerms]
|
||||
attr_accessor :non_guaranteed_fixed_price_terms
|
||||
|
@ -1533,8 +1533,7 @@ module Google
|
|||
# A generic empty message that you can re-use to avoid defining duplicated empty
|
||||
# messages in your APIs. A typical example is to use it as the request or the
|
||||
# response type of an API method. For instance: service Foo ` rpc Bar(google.
|
||||
# protobuf.Empty) returns (google.protobuf.Empty); ` The JSON representation for
|
||||
# `Empty` is empty JSON object ````.
|
||||
# protobuf.Empty) returns (google.protobuf.Empty); `
|
||||
class Empty
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -1843,11 +1842,30 @@ module Google
|
|||
# @return [Fixnum]
|
||||
attr_accessor :guaranteed_looks
|
||||
|
||||
# The lifetime impression cap for CPM sponsorship deals. The deal will stop
|
||||
# serving when the cap is reached.
|
||||
# Corresponds to the JSON property `impressionCap`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :impression_cap
|
||||
|
||||
# Daily minimum looks for CPD deal types.
|
||||
# Corresponds to the JSON property `minimumDailyLooks`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :minimum_daily_looks
|
||||
|
||||
# For sponsorship deals, this is the percentage of the seller's eligible
|
||||
# impressions that the deal will serve until the cap is reached.
|
||||
# Corresponds to the JSON property `percentShareOfVoice`
|
||||
# @return [Fixnum]
|
||||
attr_accessor :percent_share_of_voice
|
||||
|
||||
# The reservation type for a Programmatic Guaranteed deal. This indicates
|
||||
# whether the number of impressions is fixed, or a percent of available
|
||||
# impressions. If not specified, the default reservation type is STANDARD.
|
||||
# Corresponds to the JSON property `reservationType`
|
||||
# @return [String]
|
||||
attr_accessor :reservation_type
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
@ -1857,7 +1875,10 @@ module Google
|
|||
@fixed_prices = args[:fixed_prices] if args.key?(:fixed_prices)
|
||||
@guaranteed_impressions = args[:guaranteed_impressions] if args.key?(:guaranteed_impressions)
|
||||
@guaranteed_looks = args[:guaranteed_looks] if args.key?(:guaranteed_looks)
|
||||
@impression_cap = args[:impression_cap] if args.key?(:impression_cap)
|
||||
@minimum_daily_looks = args[:minimum_daily_looks] if args.key?(:minimum_daily_looks)
|
||||
@percent_share_of_voice = args[:percent_share_of_voice] if args.key?(:percent_share_of_voice)
|
||||
@reservation_type = args[:reservation_type] if args.key?(:reservation_type)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -2857,8 +2878,7 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Terms for Preferred Deals. Note that Preferred Deals cannot be created via the
|
||||
# API at this time, but can be returned in a get or list request.
|
||||
# Terms for Preferred Deals.
|
||||
class NonGuaranteedFixedPriceTerms
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -2949,6 +2969,33 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Request message to pause serving for finalized deals.
|
||||
class PauseProposalDealsRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The external_deal_id's of the deals to be paused. If empty, all the deals in
|
||||
# the proposal will be paused.
|
||||
# Corresponds to the JSON property `externalDealIds`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :external_deal_ids
|
||||
|
||||
# The reason why the deals are being paused. This human readable message will be
|
||||
# displayed in the seller's UI. (Max length: 1000 unicode code units.)
|
||||
# Corresponds to the JSON property `reason`
|
||||
# @return [String]
|
||||
attr_accessor :reason
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@external_deal_ids = args[:external_deal_ids] if args.key?(:external_deal_ids)
|
||||
@reason = args[:reason] if args.key?(:reason)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message to pause serving for an already-finalized proposal.
|
||||
class PauseProposalRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -3100,10 +3147,9 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Note: this resource requires whitelisting for access. Please contact your
|
||||
# account manager for access to Marketplace resources. A product is a segment of
|
||||
# inventory that a seller wishes to sell. It is associated with certain terms
|
||||
# and targeting information which helps the buyer know more about the inventory.
|
||||
# A product is a segment of inventory that a seller wishes to sell. It is
|
||||
# associated with certain terms and targeting information which helps the buyer
|
||||
# know more about the inventory.
|
||||
class Product
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -3220,12 +3266,10 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Note: this resource requires whitelisting for access. Please contact your
|
||||
# account manager for access to Marketplace resources. Represents a proposal in
|
||||
# the Marketplace. A proposal is the unit of negotiation between a seller and a
|
||||
# buyer and contains deals which are served. Note: you can not update, create,
|
||||
# or otherwise modify Private Auction or Preferred Deals deals through the API.
|
||||
# Fields are updatable unless noted otherwise.
|
||||
# Represents a proposal in the Marketplace. A proposal is the unit of
|
||||
# negotiation between a seller and a buyer and contains deals which are served.
|
||||
# Note: You can't update, create, or otherwise modify Private Auction deals
|
||||
# through the API. Fields are updatable unless noted otherwise.
|
||||
class Proposal
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -3365,11 +3409,9 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Note: this resource requires whitelisting for access. Please contact your
|
||||
# account manager for access to Marketplace resources. Represents a publisher
|
||||
# profile (https://support.google.com/admanager/answer/6035806) in Marketplace.
|
||||
# All fields are read only. All string fields are free-form text entered by the
|
||||
# publisher unless noted otherwise.
|
||||
# Represents a publisher profile (https://support.google.com/admanager/answer/
|
||||
# 6035806) in Marketplace. All fields are read only. All string fields are free-
|
||||
# form text entered by the publisher unless noted otherwise.
|
||||
class PublisherProfile
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
|
@ -3604,6 +3646,26 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
# Request message to resume (unpause) serving for already-finalized deals.
|
||||
class ResumeProposalDealsRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
||||
# The external_deal_id's of the deals to resume. If empty, all the deals in the
|
||||
# proposal will be resumed.
|
||||
# Corresponds to the JSON property `externalDealIds`
|
||||
# @return [Array<String>]
|
||||
attr_accessor :external_deal_ids
|
||||
|
||||
def initialize(**args)
|
||||
update!(**args)
|
||||
end
|
||||
|
||||
# Update properties of this object
|
||||
def update!(**args)
|
||||
@external_deal_ids = args[:external_deal_ids] if args.key?(:external_deal_ids)
|
||||
end
|
||||
end
|
||||
|
||||
# Request message to resume (unpause) serving for an already-finalized proposal.
|
||||
class ResumeProposalRequest
|
||||
include Google::Apis::Core::Hashable
|
||||
|
@ -3676,7 +3738,7 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :account_id
|
||||
|
||||
# Optional sub-account ID for the seller.
|
||||
# Output only. Ad manager network code for the seller.
|
||||
# Corresponds to the JSON property `subAccountId`
|
||||
# @return [String]
|
||||
attr_accessor :sub_account_id
|
||||
|
|
|
@ -16,13 +16,13 @@ module Google
|
|||
module Apis
|
||||
module Adexchangebuyer2V2beta1
|
||||
# Version of the google-apis-adexchangebuyer2_v2beta1 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.15.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.1"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20201202"
|
||||
REVISION = "20220321"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -478,6 +478,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PauseProposalDealsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class PauseProposalRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -556,6 +562,12 @@ module Google
|
|||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ResumeProposalDealsRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
include Google::Apis::Core::JsonObjectSupport
|
||||
end
|
||||
|
||||
class ResumeProposalRequest
|
||||
class Representation < Google::Apis::Core::JsonRepresentation; end
|
||||
|
||||
|
@ -1136,7 +1148,10 @@ module Google
|
|||
|
||||
property :guaranteed_impressions, :numeric_string => true, as: 'guaranteedImpressions'
|
||||
property :guaranteed_looks, :numeric_string => true, as: 'guaranteedLooks'
|
||||
property :impression_cap, :numeric_string => true, as: 'impressionCap'
|
||||
property :minimum_daily_looks, :numeric_string => true, as: 'minimumDailyLooks'
|
||||
property :percent_share_of_voice, :numeric_string => true, as: 'percentShareOfVoice'
|
||||
property :reservation_type, as: 'reservationType'
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1477,6 +1492,14 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class PauseProposalDealsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :external_deal_ids, as: 'externalDealIds'
|
||||
property :reason, as: 'reason'
|
||||
end
|
||||
end
|
||||
|
||||
class PauseProposalRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
@ -1643,6 +1666,13 @@ module Google
|
|||
end
|
||||
end
|
||||
|
||||
class ResumeProposalDealsRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
collection :external_deal_ids, as: 'externalDealIds'
|
||||
end
|
||||
end
|
||||
|
||||
class ResumeProposalRequest
|
||||
# @private
|
||||
class Representation < Google::Apis::Core::JsonRepresentation
|
||||
|
|
|
@ -852,6 +852,90 @@ module Google
|
|||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Update given deals to pause serving. This method will set the `
|
||||
# DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to true for all
|
||||
# listed deals in the request. Currently, this method only applies to PG and PD
|
||||
# deals. For PA deals, please call accounts.proposals.pause endpoint. It is a no-
|
||||
# op to pause already-paused deals. It is an error to call PauseProposalDeals
|
||||
# for deals which are not part of the proposal of proposal_id or which are not
|
||||
# finalized or renegotiating.
|
||||
# @param [String] account_id
|
||||
# Account ID of the buyer.
|
||||
# @param [String] proposal_id
|
||||
# The proposal_id of the proposal containing the deals.
|
||||
# @param [Google::Apis::Adexchangebuyer2V2beta1::PauseProposalDealsRequest] pause_proposal_deals_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Proposal] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::Adexchangebuyer2V2beta1::Proposal]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def pause_finalized_proposal_proposal_deals(account_id, proposal_id, pause_proposal_deals_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:pause', options)
|
||||
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::PauseProposalDealsRequest::Representation
|
||||
command.request_object = pause_proposal_deals_request_object
|
||||
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Proposal::Representation
|
||||
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Proposal
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['proposalId'] = proposal_id unless proposal_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Update given deals to resume serving. This method will set the `
|
||||
# DealServingMetadata.DealPauseStatus.has_buyer_paused` bit to false for all
|
||||
# listed deals in the request. Currently, this method only applies to PG and PD
|
||||
# deals. For PA deals, please call accounts.proposals.resume endpoint. It is a
|
||||
# no-op to resume running deals or deals paused by the other party. It is an
|
||||
# error to call ResumeProposalDeals for deals which are not part of the proposal
|
||||
# of proposal_id or which are not finalized or renegotiating.
|
||||
# @param [String] account_id
|
||||
# Account ID of the buyer.
|
||||
# @param [String] proposal_id
|
||||
# The proposal_id of the proposal containing the deals.
|
||||
# @param [Google::Apis::Adexchangebuyer2V2beta1::ResumeProposalDealsRequest] resume_proposal_deals_request_object
|
||||
# @param [String] fields
|
||||
# Selector specifying which fields to include in a partial response.
|
||||
# @param [String] quota_user
|
||||
# Available to use for quota purposes for server-side applications. Can be any
|
||||
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
||||
# @param [Google::Apis::RequestOptions] options
|
||||
# Request-specific options
|
||||
#
|
||||
# @yield [result, err] Result & error if block supplied
|
||||
# @yieldparam result [Google::Apis::Adexchangebuyer2V2beta1::Proposal] parsed result object
|
||||
# @yieldparam err [StandardError] error object if request failed
|
||||
#
|
||||
# @return [Google::Apis::Adexchangebuyer2V2beta1::Proposal]
|
||||
#
|
||||
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
||||
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
||||
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
||||
def resume_finalized_proposal_proposal_deals(account_id, proposal_id, resume_proposal_deals_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
||||
command = make_simple_command(:post, 'v2beta1/accounts/{accountId}/finalizedProposals/{proposalId}:resume', options)
|
||||
command.request_representation = Google::Apis::Adexchangebuyer2V2beta1::ResumeProposalDealsRequest::Representation
|
||||
command.request_object = resume_proposal_deals_request_object
|
||||
command.response_representation = Google::Apis::Adexchangebuyer2V2beta1::Proposal::Representation
|
||||
command.response_class = Google::Apis::Adexchangebuyer2V2beta1::Proposal
|
||||
command.params['accountId'] = account_id unless account_id.nil?
|
||||
command.params['proposalId'] = proposal_id unless proposal_id.nil?
|
||||
command.query['fields'] = fields unless fields.nil?
|
||||
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
||||
execute_or_queue_command(command, &block)
|
||||
end
|
||||
|
||||
# Gets the requested product by ID.
|
||||
# @param [String] account_id
|
||||
# Account ID of the buyer.
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "0f920ae5ebe394e34a9ce17dd866bea7a4621f7d"
|
||||
"sha": "a774ecf5c43274971bb2e6aa4d4fb1afa92a82b7"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "adexchangebuyer:v1.2",
|
||||
"name_pretty": "Ad Exchange Buyer API",
|
||||
"distribution_name": "google-apis-adexchangebuyer_v1_2",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,21 @@
|
|||
# Release history for google-apis-adexchangebuyer_v1_2
|
||||
|
||||
### v0.5.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.4.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.3.0 (2021-05-19)
|
||||
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -16,10 +16,10 @@ module Google
|
|||
module Apis
|
||||
module AdexchangebuyerV1_2
|
||||
# Version of the google-apis-adexchangebuyer_v1_2 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.5.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20180222"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "624dbab171689b9de641a4a43bb4db98e69e7009"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "adexchangebuyer:v1.3",
|
||||
"name_pretty": "Ad Exchange Buyer API",
|
||||
"distribution_name": "google-apis-adexchangebuyer_v1_3",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,21 @@
|
|||
# Release history for google-apis-adexchangebuyer_v1_3
|
||||
|
||||
### v0.5.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.4.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.3.0 (2021-05-19)
|
||||
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -16,10 +16,10 @@ module Google
|
|||
module Apis
|
||||
module AdexchangebuyerV1_3
|
||||
# Version of the google-apis-adexchangebuyer_v1_3 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.5.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20191108"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "624dbab171689b9de641a4a43bb4db98e69e7009"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "adexchangebuyer:v1.4",
|
||||
"name_pretty": "Ad Exchange Buyer API",
|
||||
"distribution_name": "google-apis-adexchangebuyer_v1_4",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,26 @@
|
|||
# Release history for google-apis-adexchangebuyer_v1_4
|
||||
|
||||
### v0.6.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.5.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.4.0 (2021-05-19)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.3.0 (2021-05-18)
|
||||
|
||||
* Regenerated from discovery document revision 20210516
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -3284,6 +3284,11 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :exchange
|
||||
|
||||
#
|
||||
# Corresponds to the JSON property `forecastInventory`
|
||||
# @return [String]
|
||||
attr_accessor :forecast_inventory
|
||||
|
||||
# Link to publisher's Google+ page.
|
||||
# Corresponds to the JSON property `googlePlusLink`
|
||||
# @return [String]
|
||||
|
@ -3339,13 +3344,13 @@ module Google
|
|||
# @return [String]
|
||||
attr_accessor :programmatic_contact
|
||||
|
||||
# The list of app IDs represented in this pubisher profile. Empty if this is a
|
||||
# The list of app IDs represented in this publisher profile. Empty if this is a
|
||||
# parent profile. Deprecated in favor of publisher_app.
|
||||
# Corresponds to the JSON property `publisherAppIds`
|
||||
# @return [Array<Fixnum>]
|
||||
attr_accessor :publisher_app_ids
|
||||
|
||||
# The list of apps represented in this pubisher profile. Empty if this is a
|
||||
# The list of apps represented in this publisher profile. Empty if this is a
|
||||
# parent profile.
|
||||
# Corresponds to the JSON property `publisherApps`
|
||||
# @return [Array<Google::Apis::AdexchangebuyerV1_4::MobileApplication>]
|
||||
|
@ -3402,6 +3407,7 @@ module Google
|
|||
@buyer_pitch_statement = args[:buyer_pitch_statement] if args.key?(:buyer_pitch_statement)
|
||||
@direct_contact = args[:direct_contact] if args.key?(:direct_contact)
|
||||
@exchange = args[:exchange] if args.key?(:exchange)
|
||||
@forecast_inventory = args[:forecast_inventory] if args.key?(:forecast_inventory)
|
||||
@google_plus_link = args[:google_plus_link] if args.key?(:google_plus_link)
|
||||
@is_parent = args[:is_parent] if args.key?(:is_parent)
|
||||
@is_published = args[:is_published] if args.key?(:is_published)
|
||||
|
|
|
@ -16,13 +16,13 @@ module Google
|
|||
module Apis
|
||||
module AdexchangebuyerV1_4
|
||||
# Version of the google-apis-adexchangebuyer_v1_4 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.6.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20201004"
|
||||
REVISION = "20210516"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1362,6 +1362,7 @@ module Google
|
|||
property :buyer_pitch_statement, as: 'buyerPitchStatement'
|
||||
property :direct_contact, as: 'directContact'
|
||||
property :exchange, as: 'exchange'
|
||||
property :forecast_inventory, as: 'forecastInventory'
|
||||
property :google_plus_link, as: 'googlePlusLink'
|
||||
property :is_parent, as: 'isParent'
|
||||
property :is_published, as: 'isPublished'
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "624dbab171689b9de641a4a43bb4db98e69e7009"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "adexperiencereport:v1",
|
||||
"name_pretty": "Ad Experience Report API",
|
||||
"distribution_name": "google-apis-adexperiencereport_v1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,29 @@
|
|||
# Release history for google-apis-adexperiencereport_v1
|
||||
|
||||
### v0.7.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.6.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.5.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.4.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.3.0 (2021-05-19)
|
||||
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated using generator version 0.1.1
|
||||
|
|
|
@ -51,7 +51,7 @@ require "google/apis/adexperiencereport_v1"
|
|||
client = Google::Apis::AdexperiencereportV1::AdExperienceReportService.new
|
||||
|
||||
# Authenticate calls
|
||||
client.authentication = # ... use the googleauth gem to create credentials
|
||||
client.authorization = # ... use the googleauth gem to create credentials
|
||||
```
|
||||
|
||||
See the class reference docs for information on the methods you can call from a client.
|
||||
|
@ -60,8 +60,8 @@ See the class reference docs for information on the methods you can call from a
|
|||
|
||||
More detailed descriptions of the Google simple REST clients are available in two documents.
|
||||
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
|
||||
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/main/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
|
||||
|
||||
(Note: the above documents are written for the simple REST clients in general, and their examples may not reflect the Adexperiencereport service in particular.)
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
require File.expand_path("lib/google/apis/adexperiencereport_v1/gem_version", __dir__)
|
||||
gem_version = Google::Apis::AdexperiencereportV1::GEM_VERSION
|
||||
|
||||
Gem::Specification.new do |gem|
|
||||
gem.name = "google-apis-adexperiencereport_v1"
|
||||
gem.version = Google::Apis::AdexperiencereportV1::GEM_VERSION
|
||||
gem.version = gem_version
|
||||
gem.authors = ["Google LLC"]
|
||||
gem.email = "googleapis-packages@google.com"
|
||||
gem.summary = "Simple REST client for Ad Experience Report API V1"
|
||||
|
@ -19,9 +20,9 @@ Gem::Specification.new do |gem|
|
|||
gem.license = "Apache-2.0"
|
||||
gem.metadata = {
|
||||
"bug_tracker_uri" => "https://github.com/googleapis/google-api-ruby-client/issues",
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexperiencereport_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-adexperiencereport_v1/v#{Google::Apis::AdexperiencereportV1::GEM_VERSION}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/generated/google-apis-adexperiencereport_v1"
|
||||
"changelog_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-adexperiencereport_v1/CHANGELOG.md",
|
||||
"documentation_uri" => "https://googleapis.dev/ruby/google-apis-adexperiencereport_v1/v#{gem_version}",
|
||||
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/main/generated/google-apis-adexperiencereport_v1"
|
||||
}
|
||||
|
||||
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
|
||||
|
|
|
@ -16,10 +16,10 @@ module Google
|
|||
module Apis
|
||||
module AdexperiencereportV1
|
||||
# Version of the google-apis-adexperiencereport_v1 gem
|
||||
GEM_VERSION = "0.1.0"
|
||||
GEM_VERSION = "0.7.0"
|
||||
|
||||
# Version of the code generator used to generate this client
|
||||
GENERATOR_VERSION = "0.1.1"
|
||||
GENERATOR_VERSION = "0.4.0"
|
||||
|
||||
# Revision of the discovery document this client was generated from
|
||||
REVISION = "20200823"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"git": {
|
||||
"name": ".",
|
||||
"remote": "https://github.com/googleapis/google-api-ruby-client.git",
|
||||
"sha": "c98c719bbab68d0890524d53f8b629d7858af9c2"
|
||||
"sha": "8b153b8cbaa272e6e4247904724057320b87d5e1"
|
||||
}
|
||||
}
|
||||
]
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"api_id": "admin:datatransfer_v1",
|
||||
"name_pretty": "Admin SDK API",
|
||||
"distribution_name": "google-apis-admin_datatransfer_v1",
|
||||
"language": "ruby",
|
||||
"library_type": "REST"
|
||||
}
|
|
@ -1,5 +1,33 @@
|
|||
# Release history for google-apis-admin_datatransfer_v1
|
||||
|
||||
### v0.8.0 (2021-12-14)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.7.0 (2021-10-20)
|
||||
|
||||
* Unspecified changes
|
||||
|
||||
### v0.6.0 (2021-07-21)
|
||||
|
||||
* Regenerated from discovery document revision 20210720
|
||||
|
||||
### v0.5.0 (2021-06-29)
|
||||
|
||||
* Regenerated using generator version 0.4.0
|
||||
|
||||
### v0.4.0 (2021-06-24)
|
||||
|
||||
* Regenerated using generator version 0.3.0
|
||||
|
||||
### v0.3.0 (2021-05-19)
|
||||
|
||||
* Regenerated using generator version 0.2.0
|
||||
|
||||
### v0.2.0 (2021-03-04)
|
||||
|
||||
* Regenerated using generator version 0.1.2
|
||||
|
||||
### v0.1.0 (2021-01-07)
|
||||
|
||||
* Regenerated from discovery document revision 20210105
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue